views:

496

answers:

5

I have come across various django development add ons, particularly,

django-extensions

django-annoying

django-debug-toolbar

django-tools

I haven't exactly used all of these.

I think it is hard to beat the simplicity and power obtained by the combination of django's pretty error pages combined with iPythonEmbed shell.

Which of these or other tools do you use for development, what exact features do you benefit out of it. Self written commands, scripts welcome too.

+2  A: 

I for one love django-annoying's render_to method.

@render_to('template.html')
def foo(request):
    bar = Bar.objects.all() 
    return {'bar': bar}

# equivalent to
def foo(request):
    bar = Bar.objects.all() 
    return render_to_response('template.html',
                              {'bar': bar},
                              context_instance=RequestContext(request))

I've not used any of the others yet, though I've been looking at django-debug-toolbar.

Dominic Rodger
+1  A: 

I have found django-logging to be a big help during development

+2  A: 

I use django-extensions in every project. There's a lot of stuff in there I never use, but it's worth it for the management commands shell_plus and runserver_plus alone.

Shell_plus just autoloads all your models: a major timesaver (EDIT: forgot something equally important: it also makes use of ipython if installed, for tab completion and other conveniences). Runserver_plus (requires Werkzeug) gives you an interactive 500 error debug page. You can jump into an AJAX console at any point in the traceback - brilliant.

The print_user_for_session command is also handy if you get an error email off a live site and want to contact the user who experienced the error.

Carl Meyer
Auto-loading all your models sounds great! I wrote a script for that a while back and haven't used the shell command since. (Also, auto-loading django.contrib.auth.models.User is a big deal, since it's so long to type in a shell.)
David Berger
A: 

Because I found what I use often, is not a common prevalent idea, I will answer it myself,

from IPython.Shell import IPShellEmbed
ipshell = IPShellEmbed()

ipshell() # this call anywhere in your program will start IPython

This way, when you are at a view, U can get into the command line there and explore. All required models will be imported anyway, easy replacement for shell_plus. To me it even replaces the runserver_plus of django-command-extensions.

Lakshman Prasad
A: 

I know this answer is a bit old, but the single most useful django development addon we use is django evolution. It is a schema update solution that takes a lot of the manual work out of changes in existing models. It has saved me countless hours of work.

http://code.google.com/p/django-evolution/

wlashell