Tools of Pro Django developer - aka What powers dinette and almost every app we write.

By : Shabda Raaj

There are some tools and apps which we use with almost all apps we write, and in particular which, we used for dinette. Here they are broken into useful during development, and (also) useful post development.

During Development

  1. Ipython and ipdb
  2. South
  3. Django test utils
  4. Django extensions
  5. Django debug toolbar
Ipython and ipdb

Ipython is a enhanced shell for python. Ipdb similarly add extra capacity to the builtin pdb debugger. It is extremely convenient to drop into a ipython shell right where a complex piece of code is being hit.

from IPython.Shell import IPShellEmbed
ipython = IPShellEmbed()

Of course this does not allow you to step through, so if you want to step through your code, you need to do

import ipdb

Of course, you can just do pdb.set_trace(), but with tab completion and syntax highlighting, using ipdb is a no brainer.


South adds schema migration to Django. It has lot of advanced options, but just three command will get you along way.

Convert a normal app to use the south way.

./ convert_to_south

Once you have made any changes to your apps model, write a new migration which can update the database to latest

./ startmigration appname nameofmigration --auto

Once you have written a migration, write a command to update the db.

./ migrate appanme
Django test utils

When you are running tests, a huge time sink is the time spent dropping and recreating tests. You might add just a single test, and the default Django testrunner will spend a huge time recreating the database. Enter quicktest which reuses databases between test runs. One of the side effects of this is that if you modify between test runs you should manually recreate the database.

The tests (or whatever little of it exists) for Dinette were written using testutils' testmaker.

Django extensions

Django extensions, (earlier Django command extensions) is a app which adds extra commands to It has lot of goodies, but just ./ shell_plus makes it worthwhile. (It imports all the models from all the apps automatically).

Get the full list at Github

Django debug toolbar

I do not personally use it but some people on our team swear by it.

After development

  1. Django-pagination
  2. sorl-thumbnails
  3. django-compressor
  4. Haystack

I have decided on a standard way to build apps which need pagination. a. Build apps without pagination. b. The night before release spend an hour and add pagination to all pages. Really this is all you need

{% load pagination tags %}
{% autopaginate queryset %}
{% paginate %}

There is no change required to the views.


To thumbnail an image.

{% thumbnail image size %}

"Things should be as simple as possible, but not simpler."


During development we work with multiple unminified js and css files. Django-compressor takes care of minifying and compressing it when we deploy. All we need to do is,

{% compress css %}
all css files
{% endcompress %}

{% compress js %}
all js files
{% endcompress %}

Haystack is "modular search for Django". It make writing search views as easy as writing the admin. You declaratively tell what fields you want to search on, and Haystack can take care of creating and updating the index, and providing a generic view to handle the search. Check a search view written using Haystack

To everyone who contributed to these apps, thanks. Django development won't be the same without these great tools. This post was inspired by Kevin Fricovsky's post post, The apps that power Django-Mingus and is stolen about 50% from there. Thanks. :)

We build Amazing web apps, and we can build it for you. Contact us today.

Related Posts

Can we help you build amazing apps? Contact us today.

Topics : python tips
© Agiliq, 2009-2012