Django Knowledge Base

Django framework and libraries documentation

Django Framework Documentation

Django is a free framework for Python-based web applications that uses the MVC design pattern.

Python documentation

Python is an easy to learn, powerful programming language.

Django ORM Cookbook

Django ORM Recipes is a book about working with Django ORM and Django models. Django ORM is one of the key pillars of Django.

Django Rest Framework

Django Rest Framework (DRF) is a library that works with standard Django models to create a flexible and powerful API for a project.


SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.

Django CMS

Django CMS is a modern web publishing platform built on Django, a web application framework "for perfectionists with deadlines".

Channels - extension for asynchronous work with Django

Channels is a project that takes Django and extends it beyond HTTP to handle WebSockets, chat protocols, IoT protocols, and more.

asgiref - ASGI specification and utilities

ASGI (Asynchronous Server Gateway Interface) is the spiritual successor to WSGI, designed to provide a standard interface between asynchronous web servers, platforms, and Python applications.

Python Social Auth Documentation

Python Social Auth is an easy-to-configure social authentication/registration mechanism with support for multiple platforms and authentication providers.

Django Crispy Forms - best form builder

The best way to get Django DRY forms. Create reusable programmatic layouts from components with full control over the rendered HTML without writing HTML in templates. All this without breaking the standard Django way of working, so it works great with any other forms application.

Articles, news, and tips on Django and Python

The Ultimate Guide To Sets In Python

The set class is one of the key data structures in Python. It is an unordered collection of elements without duplicates. It represents, to a certain degree, a mathematical set, and many of the commonly used mathematical operations for sets exist in Python. Often the operations for sets are much faster than alternative operations with lists, thus, to write effective code, sets are essential. In this article, I will explain the ins and outs of the set class. Let’s get to it.

Class-based vs Function-based Views in Django

In this article, we'll look at the differences between Django's class-based views (CBV) and function-based views (FBV). We'll compare and contrast and dive into the pros and cons of each approach (along with Django's built-in generic class-based views). By the end, you should have a good understanding of when to use one over the other.

Python Constants: Improve Your Code's Maintainability

In programming, the term constant refers to names representing values that don’t change during a program’s execution. Constants are a fundamental concept in programming, and Python developers use them in many cases. However, Python doesn’t have a dedicated syntax for defining constants. In practice, Python constants are just variables that never change.

Parallelism, Concurrency, and AsyncIO in Python - by example

This tutorial looks at how to speed up CPU-bound and IO-bound operations with multiprocessing, threading, and AsyncIO.

Modern Python: start a project with pyenv & poetry

Here we'll look at how to use Pyenv to manage and install different versions of Python, and Poetry to manage packages and virtual environments.

Python Project Workflow

In this article, you'll glue everything together as you develop a single project from start to finish. After developing the basic project, you'll: Wire up CI/CD with GitHub Actions, Configure coverage reporting with CodeCov, Publish the package to PyPi and the docs to Read the Docs, Update PyPI and Read the Docs via GitHub Actions

Python Project Setup – Virtual Environments and Package Management

Virtual Environments are isolated Python environments that have their own site-packages. Basically, it means that each virtual environment has its own set of dependencies to third-party packages usually installed from PyPI.

Advanced usage of Python requests - timeouts, retries, hooks

The Python HTTP library requests is probably my favourite HTTP utility in all the languages I program in. It's simple, intuitive and ubiquitous in the Python community. Most of the programs that interface with HTTP use either requests or urllib3 from the standard library.

Understanding Decorators in Python

Decorators are wrappers around Python functions (or classes) that change how these classes work. A decorator abstracts its own functioning as far away as possible. The Decorator notation is designed to be as minimally invasive as possible. A developer can develop his code within his domain as he is used to and only use the decorator to extend the functionality. Because this sounds very abstract, let’s look at some examples.

Understanding Attributes, Dicts and Slots in Python

Python is a very dynamic language by nature. Variables do not need to be declared and can be added as attributes almost everywhere.

Django and Python "Questions and answers"

Django Class-Based Views Reference