n+1 Fixing N+1 query problem in Django N+1 is a very common data-access pattern problem where a query is executed for every result of a previous query. If the definition looks cryptic, let's understand this problem
Django Django Custom Middleware Django middleware is a way to globally alter requests and responses ie. middlewares are layers of business logic that will be applied to all requests and responses. Consider an example
Django What Is Django Model Manager? Django Model Manager is the interface through which database query operations are provided to Django models. objects is the default model manager and each model needs to have at least
Celery What Is Django-Celery? In this article, we will understand what asynchronous processing is, how to set up asynchronous processing for a Django project and what are the use-cases. Let's start with the problem
ContentType How To Use GenericForeignKeys In Django In the first part of the article, we learned about the contenttypes framework and the ContentType model. In this article, we will see how that is being used in the
ContentType Understanding Django ContentType In this series, we will understand Django's ContentType and what is GenericForeignKey with examples. contenttypes is a Django app that can track all of the models installed in our Django-powered
Django Select Related Vs Prefetch Related In Django select_related and prefetch_related are ways to optimize database querying patterns when accessing related items. Both works on the same principle of prefetching data from the database, however, they
Django Model Inheritance In Django Models inheritance works the same way as normal Python class inheritance works, the only difference is, whether we want the parent models to have their own table in the database