Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django development add-ons [closed]

Tags:

python

django

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 and scripts are welcome too.

like image 441
lprsd Avatar asked Jun 19 '09 08:06

lprsd


People also ask

Why Django admin is not working?

Problems running django-admin django-admin should be on your system path if you installed Django via pip . If it's not in your path, ensure you have your virtual environment activated and you can try running the equivalent command python -m django .

Is Django hard to learn?

Django is the most popular Python web framework. But Django is also not the simplest technology to learn. It can take a long time before beginners are absolutely comfortable working with Django. However, it's important to have a good understanding of Python before diving into Django.

What is Allowed_hosts in Django settings?

ALLOWED_HOSTS. A list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configurations.

What is Runserver in Django?

The runserver command is a built-in subcommand of Django's manage.py file that will start up a development server for this specific Django project.


1 Answers

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.

like image 110
Dominic Rodger Avatar answered Sep 19 '22 16:09

Dominic Rodger