14 thoughts on “What are some django libraries that everyone should be aware of?”

  1. `django_extensions`. Once you `shell_plus –notebook` and start using Jupyter to prototype, you never go back.

    If you haven’t done this before, install `django_extensions` and `jupyter`. Run `./manage.py shell_plus –notebook` and you’ll get up a Jupyter notebook server with Django ready to go.

    Some useful bits from my workflow:

    * pd.DataFrame(list(Model.objects.all().values())) (you can make a Manager to do Model.objects.to_dataframe() too)
    * Make a keybinding for ‘restart kernel’, as you probably want to do this a lot.
    * Set a variable in settings.py to detect when you’re in a notebook environment and configure logging appropriately. (try/except around `get_ipython()`)

  2. `django-rest-framework` make APIs
    `django-auditlog` log model changes
    `django-crispy-forms` form layout and rendering
    `django-debug-toolbar` many useful features, but especially for tracking number of SQL queries
    `django-pipeline` minify/bundle your html, css, js

  3. Django-mail-templated, let’s you write email templates exact like page templates, full HTML with variables and logic etc, and then send them with the in built send_mail

  4. **Django-Rest-Framework** \- always be there ❤

    **django\_extensions** \- very util for common task, e.g \`show\_urls\` to reverse in DRF.


Leave a Comment