Are you starting a Django project soon? You’re probably wondering whether there are any useful packages out there that could help you out. Here’s a list of the most valuable Django packages with a short link and descriptions to help you get them quickly to work without doing lots of research. All the packages I chose support Python 3 and are in a stable version.

Ready to explore the world of Django packages? Let’s dive in!

The best Django packages

Note: Since there are several good reasons why coding frontend in Django isn’t the best idea, I decided to focus on packages for backend development.


Structure of the article:

{priority}. {name}

Doc: {doc_url}

Desc: {desc}

Solves: {main_issue_solved_by_package}

Awesomeness: {cool_point for cool_point in coolness_points}

1. sentry-sdk

Documentation:

https://docs.sentry.io/platforms/python/django/

Description:

  • This is a must-have tool for any Django project as it’s key that we stay informed about all the code-based issues in the application.
  • Firstly: the package immediately alerts us about all the previously-uncaught exceptions that occurred in production.
  • Secondly: we can catch the issue ourselves and send the error information to sentry, adding even more relevant data.
  • Building an alert system on our own is definitely non-trivial and debugging without this kind of logs is next to impossible.

Solves:

That situation when the server throws an error end you don’t have to investigate it.

Awesomeness:

  • It will catch any uncaught exceptions (which means 500 returned from the server with no further information usually) and send us full details about the issue right after it happens.
  • When code is working correctly, the sentry is useful as an alert system to which we can send the errors or logs about any non-normal events.


2. djangorestframework

Documentation:

https://www.django-rest-framework.org

Description:

If you want to write a REST Architectural Constraints API, this package will do that for you – together with proper, auto-generated documentation.

Solves:

No need to write the REST API yourself.

Awesomeness:

  • Creating REST API endpoints for your models will take just a few lines of code.
  • Auto-generated documentation is great because it always changes with the endpoints.


3. django-extensions

Documentation:

https://django-extensions.readthedocs.io/en/stable/index.html

Description:

  • A set of tools that help with your daily work.
  • JSONField was at first introduced in this package before it officially became part of Django 1.9 (for PostgreSQL, of course).
  • V See the awesomeness list below V But keep in mind that this repo solves several other problems, I just found them rather boring and uncommon.

Solves:

Adds a bunch of random useful functionalities.

Awesomeness:

  • command shell_plus runs Django shell with preloaded files, classes, and models that speed up any work with the Django shell.
  • more models fields like:
    • AutoSlugField – generates a unique slug for given data
    • CreationDateTimeField and ModificationDateTimeField – stores the first save to the database and the last DateTime modification.
    • Job scheduling with Django! You’ll still need some cron, but having scripts in Django makes it easier to administrate.

You might like this: 6 expert tips for building better Django models


4. django-rest-framework-jwt

Documentation:

http://getblimp.github.io/django-rest-framework-jwt/

Description:

While using DRF for some projects, it’s essential to add some JWT token authorization. That’s exactly what this package is about.

Solves:

You won’t have to implement the Authentication token for the API on your own.

Awesomeness:

Provides everything you need for JWT Auth: the login endpoint and Django auth class.


5. django-rest-swagger

Documentation:

https://marcgibbons.com/django-rest-swagger/

Description:

The DRF offers auto-generated documentation – and this package makes the documentation nicer.

Solves:

Creates nice documentation out of the DRF API for free.

Awesomeness:

  • Nice auto-documentation for your endpoints.
  • It’s easy to document custom endpoints manually.


6. easy-thumbnails

Documentation:

https://easy-thumbnails.readthedocs.io/en/stable/

Description:

Any web service that allows uploading and viewing photos needs the thumbnails feature. This package provides it.

Solves:

All servers hosting images need thumbnails, and this package is the solution.

Awesomeness:

Configurable thumbnails filed for Django models that automatically generates a smaller version of the uploaded image.


7. django-simple-history

Documentation:

https://django-simple-history.readthedocs.io/

Description:

This package keeps a history of record changes. If a client has access to the database through the admin panel, they might change something by mistake or may want to return to the previous version of the text.

Solves:

Keeps a history of changed rows in the database.

Awesomeness:

Keeps track of all model changes while setup takes no time.


8. django-adminactions

Documentation:

https://django-adminactions.readthedocs.io

Description:

A simple data export to known file types like CSV or XLS. You can also export data as a fixture to the test server, and this fixture can contain Foreign Keys. The package allows generating graphs in the admin panel as well.

Solves:

Adds some functions that come in handy during the early development stages.

Awesomeness:

Export data from admin panel to XSL, CSV, Fixture.


9. django-model-utils

Documentation:

https://django-model-utils.readthedocs.io/en/latest/index.html

Description:

A set of useful utils for Django models.

Solves:

Adds some models and fields that already help with some common issues.

Awesomeness:

MonitorField field that is DateTime field and its update to now() each time the field it’s looking to get updated.


10. django-storages

Documentation:

https://django-storages.readthedocs.io/en/latest/

Description:

  • Allows using any cloud storage services as the default file storage. That becomes important when you want to pass whatever users send us to another storage.
  • For example, a user may send us a lot of substantial data like photos, movies, or even backups. To make this data available for them without slowing down the app, it’s a good idea to use cloud storage solutions like Google Cloud.

Solves:

Using almost any remote storage as the Django default file storage.

Awesomeness:

Allows using s3 or Google storage as default file storage.


If you want to learn more about Django packages, have a look at this helpful site: https://djangopackages.org/.

And be sure to browse our company blog for more Django tips and tricks!

Andrzej Dabski
Andrzej

Andrzej is a Django/Python backend developer at Sunscrapers. He used to be a regular kid until one day, he found a Python online tutorial and there was no turning back. Andrzej likes good puzzles and bad jokes.

LOAD COMMENTS

arrow

Python

How to use Elasticsearch with Django

Are you building a Django application that needs to search through a massive data set? You might be considering to use a standard relational database. But you’ll quickly find [...]

Data science Python

Here’s why Python is so popular in Machine Learning

Machine Learning (ML) is all the rage right now, and organizations that want to take advantage of this technology for their data often turn to Python. There are many [...]

Join our newsletter.

Scroll to bottom

Hi there, we use cookies to provide you with an amazing experience on our site. If you continue without changing the settings, we'll assume that you're happy to receive all cookies on the Sunscrapers website. You can change your cookie settings at any time.

Learn more