Django Framework - A short-list with popular extensions

Hello Coders,

This article presents a short-list with popular Django modules and apps that might help Python programmers to code faster new features by reusing some valuable work provided by open-source enthusiasts.

The list is built based on my personal experience and suggestions published by developers across relevant communities: Pythoners / Django, Reddit Django and Python channels (both super cool and supportive) and the classic Python Forum.

What is Django (web framework)

Short-Note for beginners - Django is an open-source web application framework written in Python. A framework means a collection of modules and helpers that make development easier. They are logically grouped together and allow you to create web applications by reusing stuff, instead of writing all from scratch.

Useful Django Resources:

  • Django - official website and docs
  • Django - related content provided by the (popular) Full-Stack-Python platform

The Short-List

Django Extensions

This is an open-source collection of custom extensions used for Django projects, released under the MIT license.

How to use it

$ pip install django-extensions

And later, enable the extensions in Django configuration:


Call the magic, via master script:

$ # Generate (and view) a graphviz graph of app models:
$ python graph_models -a -o myapp_models.png
$ # Check templates for rendering errors:
$ python validate_templates
$ # Run the enhanced django shell:
$ python shell_plus

Django REST framework

Django REST framework is a powerful and flexible toolkit for building Web APIs with an impressive features set:

Django REST Links:

Django Debug Toolbar

The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content.

Django Extension Debug Toolbar - Screen Shot.

Django CORS Headers

A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django application from other origins.

How to use it

$ pip install django-cors-headers

Add the extension in Django configuration:


You will also need to add a middleware class to listen in on responses:


Django reCaptcha v3

This integration app implements a recaptcha field for Google reCaptcha v3.

How to use it

$ pip install django-recaptcha3

Then add django-recaptcha3 to your installed apps:


Update with reCaptcha private and public key:

RECAPTCHA_PRIVATE_KEY = 'your private key'
RECAPTCHA_PUBLIC_KEY = 'your public key'

Usage in Forms

from snowpenguin.django.recaptcha3.fields import ReCaptchaField

class ExampleForm(forms.Form):
    captcha = ReCaptchaField()

Django REST Swagger

Swagger/OpenAPI Documentation Generator for Django REST Framework.

How to use it

$ pip install django-rest-swagger

Update the to enable the app:


For a complete sample, please access the official docs and starter sample tutorial.


Django-environ allows you to use Twelve-factor methodology to configure your Django application with environment variables.

How to use it

$ pip install django-environ

Create an .env file in the root of the project (sample below):


Usage in Django Application (No need to add it to INSTALLED_APPS)

import environ
env = environ.Env(
    # set casting, default value
    DEBUG=(bool, False)
# reading .env file

# False if not in os.environ
DEBUG = env('DEBUG')

# Raises django's ImproperlyConfigured exception if SECRET_KEY not in os.environ

# Parse database connection url strings like psql://user:pass@
    # read os.environ['DATABASE_URL'] and raises ImproperlyConfigured exception if not found
    'default': env.db(),
    # read os.environ['SQLITE_URL']
    'extra': env.db('SQLITE_URL', default='sqlite:////tmp/my-tmp-sqlite.db')
Show Comments

Get the latest posts delivered right to your inbox.