Essential Django 3rd Party Packages
Django relies heavily on its ecosystem of third-party packages which add additional functionality to the framework. But since there are over 3,000 available--which you can search on the lovely Django Packages website--navigating all of them can be overwhelming.
I recently wrote a post on the 10 Most-Used Django Packages and there's a lively discussion on the official Django forum around Top 5 3rd party packages as well. But here is my current list of must-have Django packages that I reach to for almost every new project.
django-debug-toolbar Local debugging of queries, viewing requests and responses, and more.
Custom extensions including
shell_plus to automatically load models into the shell and
runserver_plus among many others.
Important information should be stored in environment variables, not in source code. This includes your
SECRET_KEY, any API keys, database credentials, payment info, and so on.
django-crispy-forms The best way to have DRY (Don't Repeat Yourself) forms.
django-filter An improved way to filter Django QuerySets based on user selections.
django-allauth A host of improvements to Django's minimal user registration defaults. Includes support for social authentication, email-only login, and many more features.
django-redis Redis support for Django.
django-q A task queue that supports Redis, Disque, and several others.
django-silk Live profiling and inspection of HTTP requests and database queries.
django-cors-headers If your backend and frontend are hosted on different sites, which is often the case, you need to manage your CORS Headers. This elegant package handles that for you.
djangorestframework_simplejwt If you want to use JWTs in your API, this is the current go-to package.
Are you handling user-uploaded content, commonly referred to as
media in the Django world? Or maybe using a dedicated CDN like S3?
django-storages has you covered with support for multiple storage providers.
sorl-thumbnail Thumbnails and image resizing.
pytest-django Testing is important and on most projects you'll reach for pytest to improve your testing suite. This plugin provides easy integration.
A plugin for adding
coverage.py to measure Django template execution.
black An uncompromising Python code formatter.
coverage Code coverage measurement.
factory-boy Improved fixture testing for Python.
pytest A framework for writing small, modular tests.
Pillow The Python Imaging Library.
gunicorn A production Python WSGI server.
pyscopg2-binary A PostgreSQL database adapter for Python.
whitenoise The default way to host static files in production for Python.
If you'd like to see even more curated packages, take a look at the awesome-django repo.