My Favorite Django Packages in 2019

Have you ever wondered “what Django packages am I missing?”. “Is there something I could use for my projects, but haven’t tried yet?”.

I’d like to share a list of my favorite Django packages! Each has a quick description and link included, so you can get what they are about – without having to do lots of research up-front.

I tried to limit this overview to packages, which will be useful for any project, and you should know about. They do one thing, do it well, and don’t require you to change your whole project to suit them.

Debugging in Dev and Prod

  • django-debug-toolbar - adds a toolbar on the right side of your Django page while in development. The toolbar shows lots of useful debug information!
  • sentry - I love Sentry so much. It’s a SaaS which can notify you when your Django project crashes or errors out. It shows lots of useful details and is very pleasant to use.
  • django-extensions - a collection of custom extensions for Django. There’s a lot in there! I’ll limit myself to the most important two tools: runserver_plus gives you the possibility to look into your app at any time. shell_plus --notebook lets you open a friggin jupyter notebook and prototype in it.

User Management

  • django-allauth - add social login to your site, and extend the way people can register. A must-have if you want to have users with social auth.

Views and Forms

Frontend & APIs

  • django-webpack-loader - include bundles built with webpack into your templates. Really useful if you have non-trivial JS in your project.
  • django-pipeline - an asset packaging library for Django. No Webpack in sight, which can feel like a blessing sometimes. I myself prefer using Webpack these days, but this is a valid option as well.
  • Django REST framework (DRF) - build RESTful APIs. It’s really good!
  • graphene-django - build a GraphQL endpoint for your project. REST is fine, but frontend devs love to have a single GQL endpoint. They are very convenient.
  • django-cors-headers - handle CORS (cross origin resource sharing) by including the right headers. Useful if your backend is on another domain than your frontend.
  • django-taggit - add tags to any of your models! It’s simple to use, and fits well into most projects.
  • django-filter - let users filter a list of objects themselves through a form.
  • django-tables2 - display your data in nifty tables outside of the admin interface (works with django-filter).
  • django-sql-explorer - write SQL queries on your Django-owned data and see results in a nice interface. A quick way to get going with reporting.
  • djangoql - add a more advanced query language to the admin. This can be a nice compromise before investing more into BI tools or writing custom scripts.
  • django-import-export - get data in and out of your app using CSV, JSON and other formats. Exactly what it sounds like and very handy.

Want more?

A good way to find cool tech, is to look at successful and popular open source projects related to Django. They know what’s good and include those techniques and packages into the code if it’s possible. You can find projects by looking at GitHub.

You can also browse through Django Packages where you can find a complete list of all packages out there and projects written in Django! Django Sites is another cool site, listing Django pages which provide their source code.

You can also learn a lot, from looking into popular starter templates. For example, check out cookiecutter-django and see a few of the above packages in action.