Programming

Programming

Exploring Various Coding Languages

Programming LanguagesSoftware DevelopmentAlgorithms and Data StructuresSoftware EngineeringWeb and Mobile Programming

مقالات این بخش

Using Mixins with Django Class‑Based Views: A Deep Dive into Flexible and Modular View Design

This article explains how mixins enhance Django’s class‑based views by providing modular, reusable functionality. It covers TemplateResponseMixin, ContextMixin, SingleObjectMixin, MultipleObjectMixin, and demonstrates how Django builds DetailView and ListView using these mixins. It also shows how to combine mixins manually, including an example using SingleObjectMixin with View.

/persian/article-fa/using-mixins-with-django-classbased-views-a-deep-dive-into-flexible-and-modular-view-design

An Introduction to Django Class‑Based Views: Structure, Usage, Subclassing, HTTP Methods, and Async Support

This article provides a complete introduction to Django’s class‑based views (CBVs). It explains how CBVs work, how to use them in URLconf, how to subclass and customize them, how to support additional HTTP methods such as HEAD, and how to write asynchronous class‑based views using async/await.

/persian/article-fa/an-introduction-to-django-classbased-views-structure-usage-subclassing-http-methods-and-async-support

Understanding Django Migrations: How They Work, Commands, Workflow, and Backend Considerations

This article provides a comprehensive explanation of Django migrations—how they track changes to your models, how to create and apply them, the commands involved, backend-specific behaviors, and best practices for version control and team collaboration.

/persian/article-fa/understanding-django-migrations-how-they-work-commands-workflow-and-backend-considerations

Managing Files in Django: FileField, Storage Systems, Custom Storage, and Advanced File Handling

This article provides a comprehensive guide to Django’s file‑handling system, including how FileField and ImageField work, how Django represents files internally, how the storage API functions, and how to implement custom or dynamic storage systems using callables and LazyObject.

/persian/article-fa/managing-files-in-django-filefield-storage-systems-custom-storage-and-advanced-file-handling

User Authentication in Django: A Complete Guide to Users, Permissions, Groups, and the Authentication Framework

This article provides a comprehensive overview of Django’s built‑in authentication system. It explains how authentication and authorization work, the components of the auth framework, installation requirements, and how to use and customize Django’s default user system.

/persian/article-fa/user-authentication-in-django-a-complete-guide-to-users-permissions-groups-and-the-authentication-framework

Django’s Cache Framework: A Complete Guide to Caching, Performance Optimization, and Memcached Configuration

This article explains how Django’s cache framework works, why caching is essential for performance, how to configure different cache backends, and how to use Memcached for high‑performance caching in medium‑ to large‑scale applications.

/persian/article-fa/djangos-cache-framework-a-complete-guide-to-caching-performance-optimization-and-memcached-configuration

Conditional View Processing in Django: ETags, Last-Modified, and the Condition Decorator

This article explains how Django handles conditional HTTP requests using ETag and Last-Modified headers. It covers the condition decorator, etag and last_modified shortcuts, how conditional processing works with unsafe HTTP methods, and how this approach compares to Django’s ConditionalGetMiddleware.

/persian/article-fa/conditional-view-processing-in-django-etags-last-modified-and-the-condition-decorator

Composite Primary Keys in Django 5.2: A Complete Guide

This article explains Django 5.2’s new support for composite primary keys. It covers how to define CompositePrimaryKey, how pk behaves as a tuple, limitations in migrations and relationships, how composite keys interact with forms and database functions, and how to properly introspect primary key fields using _meta.pk_fields.

/persian/article-fa/composite-primary-keys-in-django-52-a-complete-guide

Cryptographic Signing in Django: Secure Value Signing, Timestamp Validation, and Protecting Complex Data

This article provides a complete overview of Django’s cryptographic signing framework. It explains how to securely sign values, protect complex data structures, use salts and timestamped signatures, rotate secret keys, and detect tampering. It also covers high-level utilities such as dumps() and loads() for safely serializing and validating data.

/persian/article-fa/cryptographic-signing-in-django-secure-value-signing-timestamp-validation-and-protecting-complex-data

Sending Email in Django: A Complete Guide to send_mail, EmailMessage, and EmailMultiAlternatives

This article provides a comprehensive guide to sending email in Django. It covers the send_mail() helper, mass emailing with send_mass_mail(), advanced email composition using EmailMessage and EmailMultiAlternatives, SMTP configuration, and best practices for secure and reliable email delivery.

/persian/article-fa/sending-email-in-django-a-complete-guide-to-send-mail-emailmessage-and-emailmultialternatives

Internationalization and Localization in Django: A Complete Overview

This article explains the concepts of internationalization (i18n) and localization (l10n) in Django. It covers how Django handles translations, date and number formatting, locale definitions, language codes, message files, and format files. It also clarifies key terminology and how Django adapts content to users’ language and cultural preferences.

/persian/article-fa/internationalization-and-localization-in-django-a-complete-overview

Logging in Django: A Complete Guide to Loggers, Handlers, Filters, Formatters, Security, and Configuration

This article provides a comprehensive overview of Django’s logging system. It explains the roles of loggers, handlers, filters, and formatters, discusses security considerations, highlights the AdminEmailHandler, and shows how to configure logging using Django’s LOGGING dictionary with dictConfig.

/persian/article-fa/logging-in-django-a-complete-guide-to-loggers-handlers-filters-formatters-security-and-configuration