Add django resources (#9520)

This commit is contained in:
Kamran Ahmed
2026-01-07 13:11:20 +00:00
committed by GitHub
parent 9151aa8556
commit 9efbd2da21
56 changed files with 444 additions and 65 deletions

View File

@@ -1,3 +1,11 @@
# Admin Customization
Admin customization in Django refers to modifying the default appearance and functionality of the Django admin interface. This involves tailoring the admin site to better suit the specific needs of a project, such as changing the display of fields, adding custom actions, or altering the overall layout. Customization allows developers to create a more user-friendly and efficient experience for content managers and administrators.
Admin customization in Django refers to modifying the default appearance and functionality of the Django admin interface. This involves tailoring the admin site to better suit the specific needs of a project, such as changing the display of fields, adding custom actions, or altering the overall layout. Customization allows developers to create a more user-friendly and efficient experience for content managers and administrators.
Visit the following resources to learn more:
- [@official@The Django admin site](https://docs.djangoproject.com/en/6.0/ref/contrib/admin/#custom-template-options)
- [@article@Customizing the Django Admin](https://testdriven.io/blog/customize-django-admin/)
- [@article@Customize the Django Admin With Python](https://realpython.com/customize-django-admin-python/)
- [@article@Customizing the Django Admin](https://earthly.dev/blog/customize-django-admin-site/)
- [@video@Learn Django - Admin](https://www.youtube.com/watch?v=c_S0ZQs81XQ&list=PLOLrQ9Pn6cazhaxNDhcOIPYXt2zZhAXKO)

View File

@@ -1,3 +1,10 @@
# Aggregations
Aggregations in Django allow you to summarize data from your database tables. Instead of retrieving individual records, you can calculate values like averages, sums, minimums, maximums, and counts across a set of records. This is useful for generating reports, statistics, and other summary information directly from your database queries.
Aggregations in Django allow you to summarize data from multiple objects in your database. They compute a single summary value (like average, sum, or count) for a group of objects. Unlike annotations, which add a field to each object in a queryset, aggregations return a single value for the entire queryset. So, annotations add extra data to each item, while aggregations give you a summary of the whole collection.
Visit the following resources to learn more:
- [@official@Aggregation](https://docs.djangoproject.com/en/6.0/topics/db/aggregation/)
- [@article@QuerySets and aggregations in Django](https://blog.logrocket.com/querysets-and-aggregations-in-django/)
- [@article@Django Annotate and aggregate explained](https://coffeebytes.dev/en/django/django-annotate-and-aggregate-explained/)
- [@video@Django Aggregation & Annotation / values() and values_list() functions](https://www.youtube.com/watch?v=LEsmHKZLsBI)

View File

@@ -1,3 +1,10 @@
# Asynchronous Django
Asynchronous programming allows a program to execute multiple tasks seemingly at the same time without waiting for each task to complete before starting the next. Instead of blocking and waiting, the program can switch between tasks as needed, improving efficiency. In Django, this is achieved using tools like `async` and `await` keywords in Python, along with asynchronous views and middleware, enabling the application to handle more requests concurrently and reduce response times, especially for tasks involving I/O operations like database queries or external API calls.
Asynchronous programming allows a program to execute multiple tasks seemingly at the same time without waiting for each task to complete before starting the next. Instead of blocking and waiting, the program can switch between tasks as needed, improving efficiency. In Django, this is achieved using tools like `async` and `await` keywords in Python, along with asynchronous views and middleware, enabling the application to handle more requests concurrently and reduce response times, especially for tasks involving I/O operations like database queries or external API calls.
Visit the following resources to learn more:
- [@official@Asynchronous support](https://docs.djangoproject.com/en/6.0/topics/async/)
- [@article@Unlocking Performance: A Guide to Async Support in Django](https://dev.to/pragativerma18/unlocking-performance-a-guide-to-async-support-in-django-2jdj)
- [@article@Running tasks concurrently in Django asynchronous views](https://fly.io/django-beats/running-tasks-concurrently-in-django-asynchronous-views/)
- [@video@Introduction to async views in Django | async/await in Django views](https://www.youtube.com/watch?v=YneIutRhmgo)

View File

@@ -1,3 +1,12 @@
# Authentication
Authentication is the process of verifying the identity of a user, device, or other entity attempting to access a system or resource. It confirms that someone or something is who or what they claim to be, typically by checking credentials like usernames and passwords against a stored database. Successful authentication grants access, while failure denies it.
Authentication is the process of verifying the identity of a user, device, or other entity attempting to access a system or resource. It confirms that someone or something is who or what they claim to be, typically by checking credentials like usernames and passwords against a stored database. Successful authentication grants access, while failure denies it.
Visit the following resources to learn more:
- [@official@User authentication in Django](https://docs.djangoproject.com/en/6.0/topics/auth/)
- [@article@Django Tutorial Part 8: User authentication and permissions](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Authentication)
- [@article@Getting Started with Django 2024:Authentication and Authorization [Part 8/16]](https://medium.com/@mathur.danduprolu/django-getting-started-with-django-2024-authentication-and-authorization-part-8-16-7bf55d1f7570)
- [@article@Django Authentication Made Easy: A Complete Guide to Registration, Login, and User Management](https://dev.to/ebereplenty/django-authentication-made-easy-a-complete-guide-to-registration-login-and-user-management-2jih)
- [@video@Login With User Authentication - Django Wednesdays #21](https://www.youtube.com/watch?v=CTrVDi3tt8o)
- [@video@Django Authentication & User Management - Full Tutorial](https://www.youtube.com/watch?v=WuyKxdLcw3w)

View File

@@ -1,3 +1,9 @@
# Authorization
Authorization is the process of determining whether a user has permission to access a specific resource or perform a particular action. It focuses on verifying what an authenticated user is allowed to do within a system, ensuring that they only have access to the resources and functionalities they are entitled to. This is distinct from authentication, which confirms the user's identity.
Authorization is the process of determining whether a user has permission to access a specific resource or perform a particular action. It focuses on verifying what an authenticated user is allowed to do within a system, ensuring that they only have access to the resources and functionalities they are entitled to. This is distinct from authentication, which confirms the user's identity.
Visit the following resources to learn more:
- [@official@Permissions and Authorization¶](https://docs.djangoproject.com/en/6.0/topics/auth/default/#topic-authorization)
- [@article@Django Tutorial Part 8: User authentication and permissions](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Authentication)
- [@video@Python Django User Authorization tutorial](https://www.youtube.com/watch?v=4Ba8AtSwJwg)

View File

@@ -1,3 +1,9 @@
# Background Tasks
Background tasks in Django are processes that run independently of the main web application, without blocking user requests. They are useful for handling time-consuming or resource-intensive operations like sending emails, processing large datasets, or generating reports. By offloading these tasks to the background, the web application remains responsive and provides a better user experience.
Background tasks in Django are processes that run independently of the main web application, without blocking user requests. They are useful for handling time-consuming or resource-intensive operations like sending emails, processing large datasets, or generating reports. By offloading these tasks to the background, the web application remains responsive and provides a better user experience.
Visit the following resources to learn more:
- [@official@Djangos Tasks framework](https://docs.djangoproject.com/en/6.0/topics/tasks/)
- [@video@Background tasks in Django | How to create tasks in the background in Django - Quick & easy](https://www.youtube.com/watch?v=PUT29lvDFco)
- [@video@Intro to Background Tasks in Django With Celery](https://www.youtube.com/watch?v=y6FG-kKhGwA)

View File

@@ -1,3 +1,9 @@
# Built-in User Model
Django provides a default user model that handles common authentication tasks like user registration, login, and permission management. This model includes fields like username, password, email, first name, and last name, and it offers methods for password hashing and user authorization. It serves as a foundation for managing users in your Django project, and can be customized or extended to fit specific application requirements.
Django provides a default user model that handles common authentication tasks like user registration, login, and permission management. This model includes fields like username, password, email, first name, and last name, and it offers methods for password hashing and user authorization. It serves as a foundation for managing users in your Django project, and can be customized or extended to fit specific application requirements.
Visit the following resources to learn more:
- [@official@User model](https://docs.djangoproject.com/en/6.0/ref/contrib/auth/)
- [@article@How to Get the User Model in Django A Simple Guide With Examples](https://www.freecodecamp.org/news/how-to-get-user-model-in-django/)
- [@article@User Models](https://d-libro.com/topic/user-models/)

View File

@@ -1,3 +1,10 @@
# Caching
Caching is a technique to store frequently accessed data in a temporary storage location (the cache) to speed up future requests for that data. Instead of retrieving the data from the source (like a database) every time, which can be slow, the application first checks the cache. If the data is in the cache (a "cache hit"), it's retrieved quickly. If not (a "cache miss"), the data is retrieved from the original source, stored in the cache for future use, and then returned to the user. This reduces database load and improves application performance.
Caching is a technique to store frequently accessed data in a temporary storage location (the cache) to speed up retrieval in the future. When data is requested, the system first checks the cache. If the data is present (a "cache hit"), it's served directly from the cache, avoiding the slower process of fetching it from the original source (like a database). If the data isn't in the cache (a "cache miss"), it's retrieved from the original source, stored in the cache, and then served to the user. This reduces latency and improves application performance.
Visit the following resources to learn more:
- [@official@Djangos cache framework](https://docs.djangoproject.com/en/6.0/topics/cache/)
- [@article@Django Caching 101: Understanding the Basics and Beyond](https://dev.to/pragativerma18/django-caching-101-understanding-the-basics-and-beyond-49p)
- [@article@Django Cache Examples with a Complete Project](https://medium.com/django-unleashed/django-cache-examples-with-a-complete-project-7307322756e2)
- [@video@Caching with Redis and Django!](https://www.youtube.com/watch?v=5W2Yff00H8s)

View File

@@ -1,3 +1,11 @@
# Create, Update, Delete Operations in Django ORM
The Django ORM (Object-Relational Mapper) provides a high-level interface for interacting with databases. It allows you to perform CRUD (Create, Read, Update, Delete) operations on your database tables using Python code instead of writing raw SQL queries. This simplifies database interactions and makes your code more maintainable.
The Django ORM (Object-Relational Mapper) provides a high-level interface for interacting with databases. It allows you to perform CRUD (Create, Read, Update, Delete) operations on your database tables using Python code instead of writing raw SQL queries. This simplifies database interactions and makes your code more maintainable.
Visit the following resources to learn more:
- [@official@Making Queries](https://docs.djangoproject.com/en/6.0/topics/db/queries/#retrieving-objects)
- [@article@Django update_or_create() | With Project](https://medium.com/@KaziMushfiq1234/django-update-or-create-with-project-fdb8feb8450d)
- [@article@Django Insert Data](https://www.w3schools.com/django/django_insert_data.php)
- [@article@Django Update Data](https://www.w3schools.com/django/django_update_data.php)
- [@article@Django Delete Data](https://www.w3schools.com/django/django_delete_data.php)

View File

@@ -1,3 +1,9 @@
# Custom User Model
A custom user model in Django allows developers to define their own user model instead of using the default Django user model. This provides flexibility to include additional fields or methods tailored to the specific requirements of an application, such as storing extra profile information or implementing custom authentication logic. By creating a custom user model, you gain full control over the user representation within your Django project.
A custom user model in Django allows developers to define their own user model instead of using the default Django user model. This provides flexibility to include additional fields or methods tailored to the specific requirements of an application, such as storing extra profile information or implementing custom authentication logic. By creating a custom user model, you gain full control over the user representation within your Django project.
Visit the following resources to learn more:
- [@official@Customizing authentication in Django¶](https://docs.djangoproject.com/en/6.0/topics/auth/customizing/)
- [@article@Creating a Custom User Model in Django](https://testdriven.io/blog/django-custom-user-model/)
- [@video@Learn Django - Build a Custom User Model with Extended Fields](https://www.youtube.com/watch?v=Ae7nc1EGv-A)

View File

@@ -1,3 +1,10 @@
# Custom Middleware
Middleware in Django is a framework of hooks into Django's request/response processing. It's a way to modify the incoming request or outgoing response at various points in the process. Customization allows developers to create their own middleware components to handle specific tasks, such as request logging, authentication checks, or modifying response headers, tailoring the framework to their application's unique needs.
Middleware in Django is a framework of hooks into Django's request/response processing. It's a way to modify the incoming request or outgoing response at various points in the process. Customization allows developers to create their own middleware components to handle specific tasks, such as request logging, authentication checks, or modifying response headers, tailoring the framework to their application's unique needs.
Visit the following resources to learn more:
- [@article@Understanding Django Middleware: How to Create Custom Middleware](https://medium.com/@farad.dev/understanding-django-middleware-how-to-create-custom-middleware-789744722df3)
- [@article@A Comprehensive Guide to Django Middleware](https://www.datree.io/resources/guide-to-django-middleware#anchor5)
- [@video@Django Custom Middleware - Tutorial With Examples](https://www.youtube.com/watch?v=ELOgWKQpxB8)
- [@video@Writing Django Middleware (with tests!) | HTMX middleware | IP Blacklist middleware](https://www.youtube.com/watch?v=--ddZc39wVQ)

View File

@@ -1,3 +1,11 @@
# Django Debug Toolbar
The Django Debug Toolbar is a powerful set of panels that display various debugging information about the current request and response. It appears as a collapsible toolbar in your browser when you're developing a Django application. This toolbar provides insights into database queries, template rendering, settings, headers, static files, and more, helping developers identify and resolve performance bottlenecks and other issues quickly.
The Django Debug Toolbar is a powerful set of panels that display various debugging information about the current request and response. It appears as a collapsible toolbar in your browser when you're developing a Django application. This toolbar provides insights into database queries, template rendering, settings, headers, static files, and more, helping developers identify and resolve performance bottlenecks and other issues quickly.
Visit the following resources to learn more:
- [@official@Django Debug Toolbar](https://django-debug-toolbar.readthedocs.io/en/latest/)
- [@opensource@debug_toolbar](https://github.com/django-commons/django-debug-toolbar)
- [@article@Django Debug Toolbar: Configuration and Overview](https://medium.com/@hmbarotov/django-debug-toolbar-configuration-and-overview-97dbe8279279)
- [@video@Django Debug Toolbar - A Tool to Help You With Your Django Projects](https://www.youtube.com/watch?v=H-vLUoXKKIs)
- [@video@Mastering Django Debug Toolbar: Efficient Debugging and Optimization Techniques](https://www.youtube.com/watch?v=c5riXBYFxLk)

View File

@@ -1,3 +1,10 @@
# Debugging
Debugging in Django involves identifying and fixing errors in your code. When your Django application isn't working as expected, debugging helps you understand why. This process typically involves using tools and techniques to inspect your code's behavior, examine variables, and trace the flow of execution to pinpoint the source of the problem and resolve it.
Debugging in Django involves identifying and fixing errors in your code. When your Django application isn't working as expected, debugging helps you understand why. This process typically involves using tools and techniques to inspect your code's behavior, examine variables, and trace the flow of execution to pinpoint the source of the problem and resolve it.
Visit the following resources to learn more:
- [@official@DEBUG Mode](https://docs.djangoproject.com/en/6.0/ref/settings/#std-setting-DEBUG)
- [@article@Writing your first Django app, part 8¶](https://docs.djangoproject.com/en/6.0/intro/tutorial08/)
- [@article@Mastering Django debugging: a complete guide](https://www.aubergine.co/insights/mastering-django-debugging-a-complete-guide)
- [@video@How To Debug a Django Application in VS CODE (Visual Studio Code)](https://www.youtube.com/watch?v=spmFjhQIKOo)

View File

@@ -1,3 +1,10 @@
# Deployment
Deployment is the process of making your Django project accessible to users on the internet. This involves transferring your code, database, and other assets to a server, configuring the server to run your application, and ensuring that it can handle incoming requests. It's the final step in the development lifecycle, allowing users to interact with your Django application.
Deployment is the process of making your Django project accessible to users on the internet. This involves transferring your code, database, and other assets to a server, configuring the server to run your application, and ensuring that it can handle incoming requests. It's the final step in the development lifecycle, allowing users to interact with your Django application.
Visit the following resources to learn more:
- [@official@How to deploy Django](https://docs.djangoproject.com/en/6.0/howto/deployment/)
- [@article@Django Tutorial Part 11: Deploying Django to production](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Deployment)
- [@video@Python Django Tutorial: Deploying Your Application (Option #1) - Deploy to a Linux Server](https://www.youtube.com/watch?v=Sa_kQheCnds)
- [@video@The 4 best ways to deploy a Django application](https://www.youtube.com/watch?v=IoxHUrbiqUo)

View File

@@ -1,3 +1,12 @@
# Django REST Framework
Django REST Framework is a powerful and flexible toolkit for building Web APIs. It provides a set of tools and libraries that simplify the process of creating RESTful APIs with Django, handling tasks like request parsing, serialization, authentication, and permissioning. It allows developers to easily expose Django models and data through well-defined API endpoints.
Django REST Framework is a powerful and flexible toolkit for building Web APIs. It provides a set of tools and libraries that simplify the process of creating RESTful APIs with Django, handling tasks like request parsing, serialization, authentication, and permissioning. It allows developers to easily expose Django models and data through well-defined API endpoints.
Visit the following resources to learn more:
- [@official@Django REST framework](https://www.django-rest-framework.org/)
- [@opensource@django-rest-framework](https://github.com/encode/django-rest-framework)
- [@article@Django REST Framework Basics](https://testdriven.io/blog/drf-basics/)
- [@article@Setting Up a Django API with Django REST Framework (DRF): A Beginners Guide](https://medium.com/@michal.drozdze/setting-up-a-django-api-with-django-rest-framework-drf-a-beginners-guide-cee5d61f00a6)
- [@video@Django REST Framework Oversimplified](https://www.youtube.com/watch?v=cJveiktaOSQ)
- [@video@Django REST Framework - API Development with Django](https://www.youtube.com/playlist?list=PL-2EBeDYMIbTLulc9FSoAXhbmXpLq2l5t)

View File

@@ -1,3 +1,12 @@
# Django Admin
Django Admin is a built-in interface in Django that allows you to easily manage your application's data. It provides a user-friendly way to create, read, update, and delete (CRUD) records in your database tables through an automatically generated web interface, based on your models. This eliminates the need to build custom admin panels from scratch.
Django Admin is a built-in interface in Django that allows you to easily manage your application's data. It provides a user-friendly way to create, read, update, and delete (CRUD) records in your database tables through an automatically generated web interface, based on your models. This eliminates the need to build custom admin panels from scratch.
Visit the following resources to learn more:
- [@official@The Django admin site](https://docs.djangoproject.com/en/6.0/ref/contrib/admin/)
- [@official@django-admin and manage.py](https://docs.djangoproject.com/en/6.0/ref/django-admin/)
- [@article@Django Tutorial Part 4: Django admin site](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Admin_site)
- [@article@How to Set Up A Django Admin Site](https://www.freecodecamp.org/news/how-to-set-up-a-django-admin-site/)
- [@video@Python Django Admin tutorial](https://www.youtube.com/watch?v=4tiSmL4JmS0)
- [@video@Learn Django - Admin](https://www.youtube.com/playlist?list=PLOLrQ9Pn6cazhaxNDhcOIPYXt2zZhAXKO)

View File

@@ -1,3 +1,10 @@
# Django-allauth
Django-allauth is a reusable Django app that provides comprehensive social authentication, registration, account management, as well as local username/password authentication. It simplifies the process of integrating various authentication providers (like Google, Facebook, Twitter, etc.) into your Django project, handling the complexities of OAuth and other authentication protocols. It also offers features like email verification, password reset, and account linking.
Django-allauth is a reusable Django app that provides comprehensive social authentication, registration, account management, as well as local username/password authentication. It simplifies the process of integrating various authentication providers (like Google, Facebook, Twitter, etc.) into your Django project, handling the complexities of OAuth and other authentication protocols. It also offers features like email verification, password reset, and account linking.
Visit the following resources to learn more:
- [@official@django-allauth](https://allauth.org/)
- [@official@django-allauth Docs](https://docs.allauth.org/en/latest/)
- [@article@Django-allauth Tutorial](https://learndjango.com/tutorials/django-allauth-tutorial)
- [@video@django-allauth - Deep Dive!](https://www.youtube.com/watch?v=nmj7ThneEnc&list=PL-2EBeDYMIbQqZZoo5Dj8YAkPnZeJfcZS)

View File

@@ -1,3 +1,10 @@
# Django Forms Validation
Form validation in Django involves verifying that the data submitted by a user through a form meets specific requirements before it's processed and saved. This ensures data integrity and prevents errors by checking for things like required fields, correct data types, valid ranges, and unique values. Django provides built-in tools and mechanisms to define and execute these validation rules, making it easier to create robust and reliable forms.
Form validation in Django involves verifying that the data submitted by a user through a form meets specific requirements before it's processed and saved. This ensures data integrity and prevents errors by checking for things like required fields, correct data types, valid ranges, and unique values. Django provides built-in tools and mechanisms to define and execute these validation rules, making it easier to create robust and reliable forms.
Visit the following resources to learn more:
- [@official@Working with forms](https://docs.djangoproject.com/en/6.0/topics/forms/)
- [@article@Django Tutorial Part 9: Working with forms](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Forms#overview)
- [@video@Python Django Forms tutorial](https://www.youtube.com/watch?v=GQKKjrdS6pc)
- [@video@Django Forms Full Course](https://www.youtube.com/watch?v=pLMH_wzyTjk&list=PLaUQIPIyD0z43DiRKM0x8YNEB-1QNCOwR)

View File

@@ -1,3 +1,11 @@
# Django ORM
The Django ORM (Object-Relational Mapper) is a powerful tool that allows developers to interact with databases using Python code instead of writing raw SQL queries. It acts as an abstraction layer, translating Python objects into database queries and vice versa, simplifying database operations within a Django project. This enables developers to define database schemas using Python classes (models) and perform common database tasks like creating, reading, updating, and deleting data through a high-level API.
The Django ORM (Object-Relational Mapper) is a powerful tool that enables developers to interact with databases using Python code, eliminating the need to write raw SQL queries. It acts as an abstraction layer, translating Python objects into database queries and vice versa, simplifying database operations within a Django project. This enables developers to define database schemas using Python classes (models) and perform common database tasks like creating, reading, updating, and deleting data through a high-level API.
Visit the following resources to learn more:
- [@official@Making queries](https://docs.djangoproject.com/en/6.0/topics/db/queries/)
- [@article@An introduction to the Django ORM](https://opensource.com/article/17/11/django-orm)
- [@article@Understanding Django ORM (Object-Relational Mapping)](https://medium.com/django-unleashed/understanding-django-orm-object-relational-mapping-16f3c29db7d7)
- [@video@Django ORM Deep Dive](https://www.youtube.com/watch?v=EsBqIZmR2Uc&list=PL-2EBeDYMIbQXKsyNweppuFptuogJe2L-)
- [@video@DJ101 | Django Database ORM Mastery Course](https://www.youtube.com/playlist?list=PLOLrQ9Pn6cayYycbeBdxHUFrzTqrNE7Pe)

View File

@@ -1,3 +1,9 @@
# Django Shell
The Django Shell is an interactive Python interpreter that provides direct access to your Django project's models, database, and settings. It allows you to test code snippets, query data, and perform administrative tasks without needing to run your entire application. It's essentially a command-line environment pre-configured with your Django project's settings and models.
The Django Shell is an interactive Python interpreter that provides direct access to your Django project's models, database, and settings. It allows you to test code snippets, query data, and perform administrative tasks without needing to run your entire application. It's essentially a command-line environment pre-configured with your Django project's settings and models.
Visit the following resources to learn more:
- [@official@django-admin and manage.py](https://docs.djangoproject.com/en/6.0/ref/django-admin/)
- [@article@Useful Features of the Django Shell](https://www.nickmccullum.com/useful-features-django-shell/)
- [@article@Django Models and Shell](https://medium.com/@ksarthak4ever/django-models-and-shell-8c48963d83a3)

View File

@@ -1,3 +1,10 @@
# Django Test Framework
The Django test framework provides a structured environment for writing and running tests for Django applications. It includes tools for creating test cases, running tests, and asserting expected outcomes, ensuring that your code functions as intended and remains reliable as your project evolves. It allows developers to write unit tests, integration tests, and other types of tests to verify the correctness of their Django projects.
The Django test framework provides a structured environment for writing and running tests for Django applications. It includes tools for creating test cases, running tests, and asserting expected outcomes, ensuring that your code functions as intended and remains reliable as your project evolves. It allows developers to write unit tests, integration tests, and other types of tests to verify the correctness of their Django projects.
Visit the following resources to learn more:
- [@official@Testing in Django](https://docs.djangoproject.com/en/6.0/topics/testing/)
- [@official@Writing and running tests](https://docs.djangoproject.com/en/6.0/topics/testing/overview/)
- [@article@Django Tutorial Part 10: Testing a Django web application](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Testing)
- [@video@Django Testing Tutorial - How To Test Your Django Applications](https://www.youtube.com/watch?v=qwypH3YvMKc&list=PLbpAWbHbi5rMF2j5n6imm0enrSD9eQUaM)

View File

@@ -1,3 +1,10 @@
# django-silk
django-silk is a powerful profiling and inspection tool designed for the Django framework. It intercepts and stores HTTP requests and database query data, providing a real-time view of your application's performance. This allows developers to pinpoint bottlenecks and optimize code for improved efficiency.
django-silk is a powerful profiling and inspection tool designed for the Django framework. It intercepts and stores HTTP requests and database query data, providing a real-time view of your application's performance. This allows developers to pinpoint bottlenecks and optimize code for improved efficiency.
Visit the following resources to learn more:
- [@official@Django Silk Docs](https://silk.readthedocs.io/en/latest/)
- [@opensource@django-silk](https://github.com/jazzband/django-silk)
- [@article@Profiling Django application using django-silk.](https://medium.com/@sharif-42/profiling-django-application-using-django-silk-62cdea83fb83)
- [@video@django-silk for Profiling and Optimization with Django REST Framework](https://www.youtube.com/watch?v=OG8alXR4bEs)

View File

@@ -1,3 +1,10 @@
# Error Pages
Error pages in Django are what users see when something goes wrong with your website. Instead of a confusing or blank screen, Django can display informative pages that explain the error. These pages can show technical details helpful for developers during debugging, like the traceback (the sequence of function calls that led to the error) and the values of variables at the time of the error. You can also customize these pages to provide a more user-friendly experience, offering solutions or guidance to users who encounter problems.
Error pages in Django are what users see when something goes wrong with your website. Instead of a confusing or blank screen, Django can display informative pages that explain the error. These pages can show technical details helpful for developers during debugging, like the traceback (the sequence of function calls that led to the error) and the values of variables at the time of the error. You can also customize these pages to provide a more user-friendly experience, offering solutions or guidance to users who encounter problems.
Visit the following resources to learn more:
- [@official@Error Views](https://docs.djangoproject.com/en/6.0/ref/views/#error-views)
- [@article@Django 404 (page not found)](https://www.w3schools.com/django/django_404.php)
- [@article@Python Django Handling Custom Error Page](https://medium.com/@yildirimabdrhm/python-django-handling-custom-error-page-807087352bea)
- [@video@Django Full Course - 10.0 - Writing views. Basics, errors, custom error views](https://www.youtube.com/watch?v=4HztW_RlLRo)

View File

@@ -1,3 +1,11 @@
# Filtering and Lookups in Django ORM
Filtering and lookups are fundamental mechanisms within Django's Object-Relational Mapper (ORM) that allow you to precisely query your database. They enable you to retrieve specific data based on defined criteria, such as finding all users with a particular name or all articles published within a certain date range. These tools provide a powerful and flexible way to interact with your database without writing raw SQL queries.
Filtering and lookups are fundamental mechanisms within Django's Object-Relational Mapper (ORM) that allow you to precisely query your database. They enable you to retrieve specific data based on defined criteria, such as finding all users with a particular name or all articles published within a certain date range. These tools provide a powerful and flexible way to interact with your database without writing raw SQL queries.
Visit the following resources to learn more:
- [@official@Field lookups](https://docs.djangoproject.com/en/6.0/topics/db/queries/#field-lookups)
- [@official@How to write custom lookups](https://docs.djangoproject.com/en/6.0/howto/custom-lookups/)
- [@official@filter()](https://docs.djangoproject.com/en/6.0/ref/models/querysets/#django.db.models.query.QuerySet.filter)
- [@article@Filter Reference](https://django-filter.readthedocs.io/en/latest/ref/filters.html)
- [@video@Django ORM - QuerySet Filtering and Lookups / Ordering and Slicing QuerySets](https://www.youtube.com/watch?v=84BBAGEu064)

View File

@@ -1,3 +1,8 @@
# Logging Filters
Filters in Django's logging framework provide a way to add extra control over which log records are processed by a handler. They determine whether a specific log record should be emitted based on criteria you define. This allows you to selectively include or exclude log messages based on attributes like the logger name, log level, or any other custom logic you implement. Filters are attached to handlers, and a handler will only process a log record if all of its filters allow it.
Filters in Django's logging framework provide a way to add extra control over which log records are processed by a handler. They determine whether a specific log record should be emitted based on criteria you define. This allows you to selectively include or exclude log messages based on attributes like the logger name, log level, or any other custom logic you implement. Filters are attached to handlers, and a handler will only process a log record if all of its filters allow it.
Visit the following resources to learn more:
- [@official@Filters](https://docs.djangoproject.com/en/6.0/topics/logging/#topic-logging-parts-filters)
- [@article@Logging in Django — Part II [Filters and Formatters]](https://medium.com/django-unleashed/logging-in-django-part-ii-filters-and-formatters-c7190d360ab2)

View File

@@ -1,3 +1,10 @@
# Form Validation
Form validation in Django is the process of ensuring that the data submitted by a user through a form meets specific requirements before it's saved to the database. This involves checking for things like required fields, correct data types (e.g., email address format), minimum or maximum lengths, and other custom rules you define. If the data doesn't pass these checks, Django provides mechanisms to display error messages to the user, prompting them to correct the input.
Form validation in Django is the process of ensuring that the data submitted by a user through a form meets specific requirements before it's saved to the database. This involves checking for things like required fields, correct data types (e.g., email address format), minimum or maximum lengths, and other custom rules you define. If the data doesn't pass these checks, Django provides mechanisms to display error messages to the user, prompting them to correct the input.
Visit the following resources to learn more:
- [@official@Form and field validation](https://docs.djangoproject.com/en/6.0/ref/forms/validation/)
- [@article@Data Validation in Django](https://www.scaler.com/topics/django/data-validation-in-django/)
- [@video@Django ORM - Model Field Validators / Writing Custom Validators / ModelForms](https://www.youtube.com/watch?v=1x0Zdukpjrs)
- [@video@Try DJANGO Tutorial - 27 - Form Validation Methods](https://www.youtube.com/watch?v=wVnQkKf-gHo)

View File

@@ -1,3 +1,9 @@
# Formatters
Formatters in Django's logging framework structure log records into human-readable or machine-parseable strings. They define the layout of log messages, specifying which pieces of information (like timestamp, log level, message content, or source file) are included and how they are arranged. You can customize formatters to suit your specific needs, ensuring that log output is clear, consistent, and useful for debugging and monitoring your Django application.
Formatters in Django's logging framework structure log records into human-readable or machine-parseable strings. They define the layout of log messages, specifying which pieces of information (like timestamp, log level, message content, or source file) are included and how they are arranged. You can customize formatters to suit your specific needs, ensuring that log output is clear, consistent, and useful for debugging and monitoring your Django application.
Visit the following resources to learn more:
- [@official@Formatters](https://docs.djangoproject.com/en/6.0/topics/logging/#topic-logging-parts-formatters)
- [@article@Logging in Django — Part II [Filters and Formatters]](https://medium.com/django-unleashed/logging-in-django-part-ii-filters-and-formatters-c7190d360ab2)
- [@video@Logging in Django and Python Applications - Handlers / Formatters / Better Stack aggregation](https://www.youtube.com/watch?v=XSwIUnGXrwY)

View File

@@ -1,3 +1,9 @@
# Handlers
Handlers in Django's logging framework determine _where_ log messages go. They act as the delivery mechanism, taking log records created by loggers and sending them to specific destinations. These destinations can include the console, files, email addresses, or even external services. Different handlers can be configured to handle different log levels, allowing you to route critical errors to one location and less severe warnings to another.
Handlers in Django's logging framework determine _where_ log messages go. They act as the delivery mechanism, taking log records created by loggers and sending them to specific destinations. These destinations can include the console, files, email addresses, or even external services. Different handlers can be configured to handle different log levels, allowing you to route critical errors to one location and less severe warnings to another.
Visit the following resources to learn more:
- [@official@Handlers](https://docs.djangoproject.com/en/6.0/topics/logging/#topic-logging-parts-handlers)
- [@article@Mastering Logging in Django: A Comprehensive Guide](http://medium.com/@akshatgadodia/mastering-logging-in-django-a-comprehensive-guide-aff850d15ae3)
- [@video@Logging in Django and Python Applications - Handlers / Formatters / Better Stack aggregation](https://www.youtube.com/watch?v=XSwIUnGXrwY)

View File

@@ -4,11 +4,11 @@ Django is a high-level Python web framework that encourages rapid development an
Visit the following resources to learn more:
- [@course@Python Django 101](https://www.simplilearn.com/free-python-django-course-skillup)
- [@book@Django for Professionals](http://ia800604.us.archive.org/3/items/ebooks_202307/djangoforprofessionals.pdf)
- [@official@Django](https://www.djangoproject.com/start/overview/)
- [@official@Django Docs](https://docs.djangoproject.com/en/)
- [@article@Django Introduction](https://www.w3schools.com/django/django_intro.php)
- [@course@Python Django 101](https://www.simplilearn.com/free-python-django-course-skillup)
- [@book@Django for Professionals](http://ia800604.us.archive.org/3/items/ebooks_202307/djangoforprofessionals.pdf)
- [@video@Django Crash Course Python Web Framework](https://www.youtube.com/watch?v=0roB7wZMLqI)
- [@video@Django Tutorial for Beginners Build Powerful Backends](https://www.youtube.com/watch?v=rHux0gMZ3Eg)
- [@video@Django For Everybody - Full Python University Course](https://www.youtube.com/watch?v=o0XbHvKxw7Y)

View File

@@ -1,3 +1,10 @@
# Localization
Localization is the process of adapting a product or content to a specific target market. This involves translating text, but also adapting other elements like date formats, currency symbols, and cultural references to make the product feel native to the user's region. It ensures that the application is accessible and relevant to users from different linguistic and cultural backgrounds.
Localization is the process of adapting a product or content to a specific target market. This involves translating text, but also adapting other elements like date formats, currency symbols, and cultural references to make the product feel native to the user's region. It ensures that the application is accessible and relevant to users from different linguistic and cultural backgrounds.
Visit the following resources to learn more:
- [@official@Internationalization and localization¶](https://docs.djangoproject.com/en/6.0/topics/i18n/)
- [@article@How to Localize Your Django App](https://www.freecodecamp.org/news/localize-django-app/)
- [@article@Django i18n: A beginner's guide](https://lokalise.com/blog/django-i18n-beginners-guide/)
- [@video@Django Internationalization](https://www.youtube.com/watch?v=AlJ8cGbk8ps&list=PLcTpn5-ROA4ysIVpky5IWe0pJbHFvRuYI)

View File

@@ -1,3 +1,7 @@
# Loggers
Loggers are the entry points in Django's logging system that your code uses to record events. They capture messages, optionally filter them based on severity levels (like DEBUG, INFO, WARNING, ERROR, and CRITICAL), and then pass them on to handlers. Handlers determine what to do with the log messages, such as writing them to a file, sending them via email, or displaying them on the console. You can configure multiple loggers, each with its own settings, to manage different parts of your application's logging needs.
Loggers are the entry points in Django's logging system that your code uses to record events. They capture messages, optionally filter them based on severity levels (like DEBUG, INFO, WARNING, ERROR, and CRITICAL), and then pass them on to handlers. Handlers determine what to do with the log messages, such as writing them to a file, sending them via email, or displaying them on the console. You can configure multiple loggers, each with its own settings, to manage different parts of your application's logging needs.
Visit the following resources to learn more:
- [@official@Loggers](https://docs.djangoproject.com/en/6.0/topics/logging/#loggers)

View File

@@ -1,3 +1,11 @@
# Logging
Logging in Django provides a way to record events that occur while your application is running. It allows you to track errors, warnings, and other important information, which is crucial for debugging and monitoring your application's behavior in different environments. Django's logging system is based on Python's built-in `logging` module, offering flexibility in configuring how and where log messages are stored.
Logging in Django provides a way to record events that occur while your application is running. It allows you to track errors, warnings, and other important information, which is crucial for debugging and monitoring your application's behavior in different environments. Django's logging system is based on Python's built-in `logging` module, offering flexibility in configuring how and where log messages are stored.
Visit the following resources to learn more:
- [@official@Logging](https://docs.djangoproject.com/en/6.0/topics/logging/)
- [@official@How to configure and use logging¶](https://docs.djangoproject.com/en/6.0/howto/logging/)
- [@article@The Complete Guide to Logging in Django](https://dev.to/pragativerma18/the-complete-guide-to-logging-in-django-5fde)
- [@article@How to Get Started with Logging in Django](https://betterstack.com/community/guides/logging/how-to-start-logging-with-django/)
- [@video@Logging in Django and Python Applications - Handlers / Formatters / Better Stack aggregation](https://www.youtube.com/watch?v=XSwIUnGXrwY)

View File

@@ -1,3 +1,9 @@
# MariaDB in Django
MariaDB is an open-source relational database management system that is often used as a drop-in replacement for MySQL. It's known for its performance, stability, and rich feature set. Django can be configured to use MariaDB as its database backend, allowing you to store and manage your application's data using this database system.
MariaDB is an open-source relational database management system that is often used as a drop-in replacement for MySQL. It's known for its performance, stability, and rich feature set. Django can be configured to use MariaDB as its database backend, allowing you to store and manage your application's data using this database system.
Visit the following resources to learn more:
- [@official@MariaDB Notes](https://docs.djangoproject.com/en/6.0/ref/databases/#mariadb-notes)
- [@article@Django + MariaDB](https://medium.com/code-zen/django-mariadb-85cc9daeeef8)
- [@video@Django installation with DB (MariaDB/MYSQL) connection & virtualenv](https://www.youtube.com/watch?v=uKSzH4-cG_w)

View File

@@ -1,3 +1,12 @@
# Message Framework
The message framework in Django provides a way to deliver one-time notification messages, also known as "flash messages," to users. These messages are typically used to provide feedback about the outcome of an action, such as a successful form submission or an error that occurred. They are stored temporarily and displayed to the user on their next page view, then automatically removed.
The message framework in Django provides a way to deliver one-time notification messages, also known as "flash messages," to users. These messages are typically used to provide feedback about the outcome of an action, such as a successful form submission or an error that occurred. They are stored temporarily and displayed to the user on their next page view, then automatically removed.
Visit the following resources to learn more:
- [@official@The messages framework](https://docs.djangoproject.com/en/6.0/ref/contrib/messages/)
- [@article@Messages Framework](https://django-advanced-training.readthedocs.io/en/latest/features/contrib.messages/)
- [@article@Implementing Messaging Functionality with the Messages Framework in Django](https://medium.com/@iamalisaleh/implementing-messaging-functionality-with-the-messages-framework-in-django-23d7afc8f1d2)
- [@article@Basics of Django Messages Framework](https://micropyramid.com/blog/basics-of-django-message-framework/)
- [@video@#23 Django tutorials | Passing Messages](https://www.youtube.com/watch?v=Mf_97YaUKag)
- [@video@Exploring Django | The Messages Framework](https://www.youtube.com/watch?v=MhUfgeWFgos)

View File

@@ -1,3 +1,11 @@
# Middleware
Middleware is a framework of hooks into Django's request/response processing. It's a way to modify the incoming request or outgoing response at different stages of the process. Each middleware component is a class that performs a specific function, like modifying request headers, handling sessions, or logging user activity, before the view is executed or after the response is generated.
Middleware is a framework of hooks into Django's request/response processing. It's a way to modify the incoming request or outgoing response at different stages of the process. Each middleware component is a class that performs a specific function, like modifying request headers, handling sessions, or logging user activity, before the view is executed or after the response is generated.
Visit the following resources to learn more:
- [@official@Middleware](https://docs.djangoproject.com/en/6.0/topics/http/middleware/)
- [@official@Middleware Componetns](https://docs.djangoproject.com/en/6.0/ref/middleware/)
- [@article@A Comprehensive Guide to Django Middleware](https://www.datree.io/resources/guide-to-django-middleware)
- [@article@What is Django Middleware & Its Role in Request Processing](https://www.horilla.com/blogs/what-is-django-middleware-and-its-role-in-request-processing/)
- [@video@Writing Django Middleware (with tests!) | HTMX middleware | IP Blacklist middleware](https://www.youtube.com/watch?v=--ddZc39wVQ)

View File

@@ -1,3 +1,11 @@
# Migrations
Migrations are Django's way of propagating changes you make to your models (like adding a field, deleting a model, etc.) into your database schema. They are essentially files that contain instructions on how to modify your database to match your model definitions. These files are generated based on the differences between your current models and the last known state of your database, allowing you to evolve your database schema over time in a controlled and reversible manner.
Migrations are Django's way of propagating changes you make to your models (like adding a field, deleting a model, etc.) into your database schema. They are essentially files that contain instructions on how to modify your database to match your model definitions. These files are generated based on the differences between your current models and the last known state of your database, allowing you to evolve your database schema over time in a controlled and reversible manner.
Visit the following resources to learn more:
- [@official@Migrations](https://docs.djangoproject.com/en/6.0/topics/migrations/)
- [@official@Migration Operations](https://docs.djangoproject.com/en/6.0/ref/migration-operations/)
- [@article@Mastering Django Migrations: A Complete Beginners Guide](https://medium.com/simform-engineering/mastering-django-migrations-a-complete-beginners-guide-a50d29924c7c)
- [@article@Squashing Django Migrations the Easy Way](https://jacklinke.com/squashing-django-migrations-the-easy-way)
- [@video@Django - What are migrations - actually? Introduction to migrations and the Django database](https://www.youtube.com/watch?v=N4gjiJumTZg)

View File

@@ -1,3 +1,10 @@
# Model Form Validation
ModelForm validation in Django involves ensuring that the data entered into a form, which is directly tied to a Django model, meets specific criteria before it's saved to the database. This process includes checking data types, lengths, and any custom validation rules defined in the model or the form itself, guaranteeing data integrity and preventing errors.
ModelForm validation in Django involves ensuring that the data entered into a form, which is directly tied to a Django model, meets specific criteria before it's saved to the database. This process includes checking data types, lengths, and any custom validation rules defined in the model or the form itself, guaranteeing data integrity and preventing errors.
Visit the following resources to learn more:
- [@official@Creating forms from models](https://docs.djangoproject.com/en/6.0/topics/forms/modelforms/)
- [@article@Create Model Objects With a ModelForm](https://openclassrooms.com/en/courses/6967196-create-a-web-application-with-django/7349525-create-model-objects-with-a-modelform)
- [@article@ModelForm](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Forms#modelforms)
- [@video@Model Form | Django](https://www.youtube.com/watch?v=VOddmV4Xl1g)

View File

@@ -1,3 +1,11 @@
# MySQL in Django
MySQL is a popular open-source relational database management system. Django supports MySQL as one of its database backends, allowing you to store and manage your application's data using MySQL's robust features. To use MySQL with Django, you'll need to install the appropriate MySQL driver, configure your Django project's settings to connect to the database, and then define your data models and interact with the database using Django's ORM.
MySQL is a popular open-source relational database management system. Django supports MySQL as one of its database backends, allowing you to store and manage your application's data using MySQL's robust features. To use MySQL with Django, you'll need to install the appropriate MySQL driver, configure your Django project's settings to connect to the database, and then define your data models and interact with the database using Django's ORM.
Visit the following resources to learn more:
- [@official@MySQL Notes](https://docs.djangoproject.com/en/6.0/ref/databases/#mysql-notes)
- [@article@Beginners Django Guide: Setting Up Projects with MySQL](https://medium.com/@nikhilrpandey15/beginners-guide-to-django-setting-up-projects-with-mysql-03ff8cb43a44)
- [@article@Django-MySQL Documentation](https://django-mysql.readthedocs.io/en/latest/)
- [@video@How to Connect MySQL database with Django Project | Beginners Tutorial](https://www.youtube.com/watch?v=5g_xIwxLSJk)
- [@video@How to Create a Django MySQL Database with Django Models](https://www.youtube.com/watch?v=IiUYyZo2gTk)

View File

@@ -1,3 +1,11 @@
# Pagination
Pagination divides large datasets into smaller, discrete pages, improving user experience and server performance. In Django, this is typically used when displaying a large number of objects, such as blog posts or product listings. Instead of loading all items at once, pagination allows users to navigate through the data in manageable chunks, reducing load times and making it easier to find specific information.
Pagination divides large datasets into smaller, discrete pages, improving user experience and server performance. In Django, this is typically used when displaying a large number of objects, such as blog posts or product listings. Instead of loading all items at once, pagination allows users to navigate through the data in manageable chunks, reducing load times and making it easier to find specific information.
Visit the following resources to learn more:
- [@official@Pagination](https://docs.djangoproject.com/en/6.0/topics/pagination/)
- [@official@Paginator](https://docs.djangoproject.com/en/6.0/ref/paginator/)
- [@article@Pagination in Django](https://testdriven.io/blog/django-pagination/)
- [@article@Django Pagination Tutorial with Example](https://medium.com/django-unleashed/django-pagination-tutorial-with-example-745cefd54eb3)
- [@video@Pagination For Django - Django Wednesdays #18](https://www.youtube.com/watch?v=N-PB-HMFmdo)

View File

@@ -1,3 +1,13 @@
# PDB and IPDB
PDB (Python Debugger) is an interactive source code debugger for Python programs. It allows you to pause your program during execution, inspect variables, step through code line by line, and set breakpoints. IPDB is an enhanced version of PDB that uses IPython, providing features like tab completion, syntax highlighting, and better introspection capabilities, making the debugging process more efficient and user-friendly.
PDB (Python Debugger) is an interactive source code debugger for Python programs. It allows you to pause your program during execution, inspect variables, step through code line by line, and set breakpoints. IPDB is an enhanced version of PDB that uses IPython, providing features like tab completion, syntax highlighting, and better introspection capabilities, making the debugging process more efficient and user-friendly.
Visit the following resources to learn more:
- [@official@pdb](https://docs.python.org/3/library/pdb.html)
- [@article@Python Debugging With Pdb](https://realpython.com/python-debugging-pdb/)
- [@article@Debugging Python Apps: A Comprehensive Guide to pdb](https://sunscrapers.com/blog/python-debugging-guide-pdb/)
- [@video@python debugger crash course: pdb / breakpoint (beginner - intermediate) anthony explains #097](https://www.youtube.com/watch?v=0LPuG825eAk)
- [@official@ipdb](vhttps://pypi.org/project/ipdb/)
- [@article@A Guide to Debugging Python Code with ipdb](https://betterstack.com/community/guides/scaling-python/python-debugging/)
- [@video@How to use ipdb the interactive python debugger](https://www.youtube.com/watch?v=EnC9ciDkXqA)

View File

@@ -1,3 +1,12 @@
# PostgreSQL in Django
PostgreSQL is an open-source, advanced relational database management system (RDBMS) known for its reliability, data integrity, and adherence to standards. It offers a wide range of features, including support for complex data types, advanced indexing, and transactional integrity, making it a robust choice for managing structured data. Django fully supports PostgreSQL as one of its primary database backends.
PostgreSQL is an open-source, advanced relational database management system (RDBMS) known for its reliability, data integrity, and adherence to standards. It offers a wide range of features, including support for complex data types, advanced indexing, and transactional integrity, making it a robust choice for managing structured data. Django fully supports PostgreSQL as one of its primary database backends.
Visit the following resources to learn more:
- [@roadmap@Visit the Dedicated PostgreSQL Roadmap](https://roadmap.sh/postgresql-dba)
- [@official@PostgreSQL Notes](https://docs.djangoproject.com/en/6.0/ref/databases/#postgresql-notes)
- [@article@Complete Tutorial: Set-up PostgreSQL Database with Django Application](https://medium.com/django-unleashed/complete-tutorial-set-up-postgresql-database-with-django-application-d9e789ffa384)
- [@article@Connect to Database](https://www.w3schools.com/django/django_db_connect.php)
- [@video@Django PostgreSQL | Django PostgreSQL Database Setup](https://www.youtube.com/watch?v=FlzfWgVZuyY)
- [@video@Easiest Way To Connect Django To A Postgres Database](https://www.youtube.com/watch?v=HEV1PWycOuQ)

View File

@@ -1,3 +1,8 @@
# Production Checklist
A production checklist is a structured list of tasks and configurations that need to be verified and completed before deploying a Django application to a live, production environment. It ensures that the application is secure, performant, and reliable for end-users by covering aspects like security settings, database configurations, static file handling, and monitoring setup.
A production checklist is a structured list of tasks and configurations that need to be verified and completed before deploying a Django application to a live, production environment. It ensures that the application is secure, performant, and reliable for end-users by covering aspects like security settings, database configurations, static file handling, and monitoring setup.
Visit the following resources to learn more:
- [@official@Deployment checklist](https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/)
- [@article@The Django Deployment Checklist: Zero to Production in 30 Minutes](https://medium.com/@anas-issath/the-django-deployment-checklist-zero-to-production-in-30-minutes-50d176a96560)

View File

@@ -1,3 +1,13 @@
# pytest
pytest is a popular Python testing framework that simplifies writing and running tests. It offers features like auto-discovery of test functions, simple assertion syntax, extensive plugin support, and detailed error reporting. pytest aims to make testing more efficient and readable, allowing developers to focus on verifying the correctness of their code.
pytest is a popular Python testing framework that simplifies writing and running tests. It offers features like auto-discovery of test functions, simple assertion syntax, extensive plugin support, and detailed error reporting. pytest aims to make testing more efficient and readable, allowing developers to focus on verifying the correctness of their code.
Visit the following resources to learn more:
- [@official@pytest docs](https://docs.pytest.org/en/stable/)
- [@official@pytest-django Documentation](https://pytest-django.readthedocs.io/en/latest/)
- [@opensource@pytest](https://github.com/pytest-dev/pytest)
- [@article@Hands On Guide to Unit Testing with Pytest and Django](https://klementomeri.medium.com/path-to-tight-sleep-with-test-automation-81916b567745)
- [@article@How to Use Pytest for Unit Testing](https://www.datacamp.com/tutorial/pytest-tutorial-a-hands-on-guide-to-unit-testing)
- [@video@Pytest Mastery with Django](https://www.youtube.com/watch?v=LYX6nlECcro&list=PLOLrQ9Pn6caw3ilqDR8_qezp76QuEOlHY)
- [@video@Re-Write Django tests with pytest | pytest fixtures & test functions](https://www.youtube.com/watch?v=pdatgYDXmSE)

View File

@@ -1,3 +1,10 @@
# Query Optimization
Query optimization is the process of improving the efficiency of database queries to reduce execution time and resource consumption. It involves analyzing queries, identifying bottlenecks, and applying techniques like indexing, query rewriting, and caching to minimize the amount of data processed and the number of database operations performed. The goal is to make queries run faster and more efficiently, leading to improved application performance and scalability.
Query optimization is the process of improving the efficiency of database queries to reduce execution time and resource consumption. It involves analyzing queries, identifying bottlenecks, and applying techniques like indexing, query rewriting, and caching to minimize the amount of data processed and the number of database operations performed. The goal is to make queries run faster and more efficiently, leading to improved application performance and scalability.
Visit the following resources to learn more:
- [@official@Database access optimization](https://docs.djangoproject.com/en/6.0/topics/db/optimization/)
- [@article@Django Query Optimization - Defer, Only, and Exclude](https://testdriven.io/blog/django-query-optimization/)
- [@article@Fine-Tuning Django ORM: Proven Optimization Techniques](https://medium.com/simform-engineering/django-orm-optimization-5763f3915365)
- [@video@Django Query Optimization / select_related & prefetch_related / django-debug-toolbar / N+1 Problem](https://www.youtube.com/watch?v=a3dTy8RO5Ho)

View File

@@ -1,3 +1,9 @@
# Querying Data with Django ORM
The Django ORM (Object-Relational Mapper) provides a powerful and convenient way to interact with your database. Instead of writing raw SQL queries, you use Python code to retrieve data from your models. This involves using methods like `filter()`, `get()`, `all()`, and `exclude()` on your model's manager (usually `objects`) to specify the conditions for the data you want to retrieve. These methods return QuerySets, which are lazy-evaluated collections of model instances that match your criteria.
The Django ORM (Object-Relational Mapper) provides a powerful and convenient way to interact with your database. Instead of writing raw SQL queries, you use Python code to retrieve data from your models. This involves using methods like `filter()`, `get()`, `all()`, and `exclude()` on your model's manager (usually `objects`) to specify the conditions for the data you want to retrieve. These methods return QuerySets, which are lazy-evaluated collections of model instances that match your criteria.
Visit the following resources to learn more:
- [@official@Making Queries](https://docs.djangoproject.com/en/6.0/topics/db/queries/#retrieving-objects)
- [@article@An introduction to the Django ORM](https://opensource.com/article/17/11/django-orm)
- [@video@Django ORM Mastery Series](https://www.youtube.com/playlist?list=PLOLrQ9Pn6cazjoDEnwzcdWWf4SNS0QZml)

View File

@@ -1,3 +1,9 @@
# Raw SQL Queries
Raw SQL queries in Django allow you to bypass the Django ORM and write SQL statements directly. This is useful when you need to optimize performance, access database-specific features not supported by the ORM, or execute complex queries that are difficult to express using the ORM's query API. It provides a way to interact with the database at a lower level, giving you more control over the generated SQL.
Raw SQL queries in Django allow you to bypass the Django ORM and write SQL statements directly. This is useful when you need to optimize performance, access database-specific features not supported by the ORM, or execute complex queries that are difficult to express using the ORM's query API. It provides a way to interact with the database at a lower level, giving you more control over the generated SQL.
Visit the following resources to learn more:
- [@official@Performing raw SQL queries](https://docs.djangoproject.com/en/6.0/topics/db/sql/)
- [@article@Django Running Raw Queries](https://www.scaler.com/topics/django/django-running-raw-queries/)
- [@video@Django ORM - Performing raw SQL queries](https://www.youtube.com/watch?v=iWDvsMOngxk)

View File

@@ -1,3 +1,9 @@
# Routers in Django REST Framework
Routers in Django REST Framework (DRF) provide an automated way to generate URL patterns for your API views. Instead of manually defining URLs for common API actions like listing, creating, retrieving, updating, and deleting resources, routers handle this automatically based on the viewsets you define. This simplifies URL configuration and promotes consistency across your API.
Routers in Django REST Framework (DRF) provide an automated way to generate URL patterns for your API views. Instead of manually defining URLs for common API actions like listing, creating, retrieving, updating, and deleting resources, routers handle this automatically based on the viewsets you define. This simplifies URL configuration and promotes consistency across your API.
Visit the following resources to learn more:
- [@official@Routers](https://www.django-rest-framework.org/api-guide/routers/)
- [@article@Django REST Framework: ViewSets and Routers Explained (Part 2)](https://medium.com/@michal.drozdze/django-rest-framework-viewsets-and-routers-explained-part-2-4d866a0ab5e1)
- [@video@Viewsets & Routers in Django REST Framework](https://www.youtube.com/watch?v=4MrB4IvW6Ow)

View File

@@ -1,3 +1,12 @@
# Serializers
Serializers in Django REST Framework transform complex data, like querysets and model instances, into Python datatypes that can be easily rendered into JSON, XML, or other content types. They also handle the reverse process, allowing parsed data to be converted back into model instances after validation. This makes them essential for building RESTful APIs that can both receive and send data in a structured and manageable way.
Serializers in Django REST Framework transform complex data, like querysets and model instances, into Python datatypes that can be easily rendered into JSON, XML, or other content types. They also handle the reverse process, allowing parsed data to be converted back into model instances after validation. This makes them essential for building RESTful APIs that can both receive and send data in a structured and manageable way.
Visit the following resources to learn more:
- [@official@Serializers](https://www.django-rest-framework.org/api-guide/serializers/)
- [@official@Tutorial 1: Serialization](https://www.django-rest-framework.org/tutorial/1-serialization/)
- [@official@Serializer relations](https://www.django-rest-framework.org/api-guide/relations/)
- [@article@Effectively Using Django REST Framework Serializers](https://testdriven.io/blog/drf-serializers/)
- [@video@Django Rest Framework | Serializers & CRUD](https://www.youtube.com/watch?v=TmsD8QExZ84)
- [@video@Django REST Framework- Nested Serializers, SerializerMethodField and Serializer Relations](https://www.youtube.com/watch?v=KfSYadIFHgY)

View File

@@ -1,3 +1,11 @@
# Signals
Signals in Django allow certain actions to be triggered when specific events occur in your application. Think of them as a way to let different parts of your code communicate with each other without being directly linked. When a particular event happens (like a model being saved or deleted), a signal is sent out, and any functions that are connected to that signal will be executed. This provides a decoupled way to perform tasks in response to events throughout your Django project.
Signals in Django allow certain actions to be triggered when specific events occur in your application. Think of them as a way to let different parts of your code communicate with each other without being directly linked. When a particular event happens (like a model being saved or deleted), a signal is sent out, and any functions that are connected to that signal will be executed. This provides a decoupled way to perform tasks in response to events throughout your Django project.
Visit the following resources to learn more:
- [@official@Signals](https://docs.djangoproject.com/en/6.0/topics/signals/)
- [@official@Signal List](https://docs.djangoproject.com/en/6.0/ref/signals/)
- [@article@How to Use Django Signals in Your Projects](https://www.freecodecamp.org/news/how-to-use-django-signals-in-your-projects/)
- [@video@Django Signals - Introduction!](https://www.youtube.com/watch?v=8p4M-7VXhAU)
- [@video@Django Signals](https://www.youtube.com/watch?v=rEX50LJrFuU&list=PL0efIqwJO9kDGQ34csSYNSm2udR4kOrdb)

View File

@@ -1,3 +1,10 @@
# Static Files
Static files in web development refer to the unchanging assets that make up the user interface of a website, such as images, CSS stylesheets, JavaScript files, and fonts. These files are served directly to the user's browser without requiring any server-side processing, contributing to the overall look, feel, and functionality of the website.
Static files in web development refer to the unchanging assets that make up the user interface of a website, such as images, CSS stylesheets, JavaScript files, and fonts. These files are served directly to the user's browser without requiring any server-side processing, contributing to the overall look, feel, and functionality of the website.
Visit the following resources to learn more:
- [@official@How to manage static files (e.g. images, JavaScript, CSS)](https://docs.djangoproject.com/en/6.0/howto/static-files/)
- [@article@Working with Static and Media Files in Django](https://testdriven.io/blog/django-static-files/)
- [@article@Django - Add Static File](https://www.w3schools.com/django/django_add_static_files.php)
- [@video@Django Tutorial #8 - Static Assets](https://www.youtube.com/watch?v=kJJx77PYMFA)

View File

@@ -1,9 +1,3 @@
# The MVC Model
# The MCV Model
The Model-View-Controller (MVC) architectural pattern separates an application into three interconnected parts. The Model manages data and business logic, the View displays data to the user, and the Controller handles user input and updates the Model. Django uses a slightly modified version called Model-Template-View (MTV), where the Template is the presentation layer (like the View in MVC), and the View handles the logic of what data to display (like the Controller in MVC). Django's framework structure naturally encourages this separation of concerns, making it easier to develop and maintain complex web applications.
Visit the following resources to learn more:
- [@article@MVC Architecture Explained: Model, View, Controller](https://www.codecademy.com/article/mvc-architecture-model-view-controller)
- [@article@MVC](https://developer.mozilla.org/en-US/docs/Glossary/MVC)
- [@video@MVC Explained in 4 Minutes](https://www.youtube.com/watch?v=DUg2SWWK18I)
The Model-View-Controller (MVC) architectural pattern separates an application into three interconnected parts. The Model manages data and business logic, the View displays data to the user, and the Controller handles user input and updates the Model. Django uses a slightly modified version called Model-Template-View (MTV), where the Template is the presentation layer (like the View in MVC), and the View handles the logic of what data to display (like the Controller in MVC). Django's framework structure naturally encourages this separation of concerns, making it easier to develop and maintain complex web applications.

View File

@@ -1,3 +1,10 @@
# unittest & TestCase
`unittest` is Python's built-in testing framework, providing a standard way to write and run tests. `TestCase` is a class within `unittest` that's used as a base class for creating individual test cases. You define methods within your `TestCase` subclass that represent specific tests, using assertions to check for expected outcomes.
`unittest` is Python's built-in testing framework, providing a standard way to write and run tests. `TestCase` is a class within `unittest` that's used as a base class for creating individual test cases. You define methods within your `TestCase` subclass that represent specific tests, using assertions to check for expected outcomes.
Visit the following resources to learn more:
- [@official@Writing and running tests](https://docs.djangoproject.com/en/6.0/topics/testing/overview/)
- [@article@Django Testing with unittest](https://medium.com/@hmbarotov/django-testing-with-unittest-f797c746bfe0)
- [@video@Testing in Django Tutorial #3 - The Python unittest Module](https://www.youtube.com/watch?v=Ob25drPBgu0)
- [@video@Testing in Django Tutorial #4 - Django Testing Basics](https://www.youtube.com/watch?v=QklKI2etw30)

View File

@@ -6,5 +6,5 @@ Visit the following resources to learn more:
- [@official@UpdateView](https://docs.djangoproject.com/en/6.0/ref/class-based-views/generic-editing/#django.views.generic.edit.UpdateView)
- [@article@A Brief Look at Djangos UpdateView](https://medium.com/@zarker24/a-brief-look-at-djangos-updateview-8a732d5d2c5b)
- [@video@Learn Django Class Based Views - UpdateView - Theory and Examples](https://www.youtube.com/watch?v=EUUjJdw3EBM)
- [@article@Django Tutorial for Beginners - 32 - UpdateView and DeleteView](https://www.youtube.com/watch?v=5Ez2NXOX9zY)
- [@article@Django Tutorial for Beginners - 32 - UpdateView and DeleteView](https://www.youtube.com/watch?v=5Ez2NXOX9zY)
- [@video@Learn Django Class Based Views - UpdateView - Theory and Examples](https://www.youtube.com/watch?v=EUUjJdw3EBM)

View File

@@ -1,3 +1,11 @@
# Users & Permissions
User authentication and authorization are fundamental aspects of web application security. Django provides a built-in system for managing users, groups, and permissions, allowing developers to control access to different parts of their application. This system defines who can access what, ensuring data integrity and security.
User authentication and authorization are fundamental aspects of web application security. Django provides a built-in system for managing users, groups, and permissions, allowing developers to control access to different parts of their application. This system defines who can access what, ensuring data integrity and security.
Visit the following resources to learn more:
- [@official@Using the Django authentication system](https://docs.djangoproject.com/en/6.0/topics/auth/default/#auth-admin)
- [@official@Managing users in the admin](https://docs.djangoproject.com/en/6.0/topics/auth/default/#auth-admin)
- [@article@Django Tutorial Part 8: User authentication and permissions](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Server-side/Django/Authentication)
- [@article@Permissions in Django](https://testdriven.io/blog/django-permissions/)
- [@video@Django Permissions system - deep dive with Users, Groups and Permissions](https://www.youtube.com/watch?v=IF_ZpCiZKkw)

View File

@@ -1,3 +1,11 @@
# Views & ViewSets
Views in Django REST Framework handle the logic for processing incoming web requests and returning responses, similar to regular Django views. ViewSets provide a way to group related views into a single class, reducing code duplication and simplifying the creation of complex APIs by offering pre-built actions like list, create, retrieve, update, and delete.
Views in Django REST Framework handle the logic for processing incoming web requests and returning responses, similar to regular Django views. ViewSets provide a way to group related views into a single class, reducing code duplication and simplifying the creation of complex APIs by offering pre-built actions like list, create, retrieve, update, and delete.
Visit the following resources to learn more:
- [@official@Viewsets](https://www.django-rest-framework.org/api-guide/viewsets/)
- [@official@Tutorial 6: ViewSets & Routers](https://www.django-rest-framework.org/tutorial/6-viewsets-and-routers/)
- [@article@Django REST Framework Views - ViewSets](https://testdriven.io/blog/drf-views-part-3/)
- [@video@Viewsets & Routers in Django REST Framework](https://www.youtube.com/watch?v=4MrB4IvW6Ow)
- [@video@Django REST Framework - Generic Views | ListAPIView & RetrieveAPIView](https://www.youtube.com/watch?v=vExjSChWPWg)

View File

@@ -1,3 +1,11 @@
# Whitenoise
Whitenoise is a library that allows your web application to serve static files directly from its own WSGI server. This means you don't need to rely on a separate web server like Nginx or Apache to serve static assets such as CSS, JavaScript, and images. It simplifies deployment, especially in environments where configuring a separate static file server is complex or undesirable.
Whitenoise is a library that allows your web application to serve static files directly from its own WSGI server. This means you don't need to rely on a separate web server like Nginx or Apache to serve static assets such as CSS, JavaScript, and images. It simplifies deployment, especially in environments where configuring a separate static file server is complex or undesirable.
Visit the following resources to learn more:
- [@official@WhiteNoise Docs](https://whitenoise.readthedocs.io/en/stable/index.html)
- [@official@whitenoise](https://pypi.org/project/whitenoise/)
- [@article@Mastering Django Whitenoise: A Deep Dive into Efficient Static File Management](https://medium.com/@karimmirzaguliyev/mastering-django-whitenoise-a-deep-dive-into-efficient-static-file-management-fa2aa5f669e6)
- [@article@Django - Installing WhiteNoise](https://www.w3schools.com/django/django_static_whitenoise.php)
- [@video@Whitenoise for Django Static Assets - Overview!](https://www.youtube.com/watch?v=QZTk8txo6x0)