Use Django 1.3’s Development Server in an IDE with autoloading.
Normally, when you utilize Django’s built-in development server from the command line by issuing the command manage.py runserver . Whenever you make a change to one of your site’s files, say your views.py, the django runserver automatically detects that change and reloads the file.
However, there is a bug in Django 1.3 that will cause an error if an IDE tries to issue that same command without using the –noreload argument, which, as the parameter name indicates, prevents the Django runserver from autoreloading the files.
The solution is to make the following change to your django installation’s autoreload.py file:
Now you can have a fully functioning runserver even if you’re using an IDE like yours truly. I hope this helps someone out there.
My new preferred way is just to issue the command python manage.py runserver from the terminal. I just leave the terminal open on one of my monitors so that I can see all the output from the runserver . This way I don’t have to go through the hassle of editing autoreload.py for every django installation. Yes, I’m that lazy 🙂 .
Filed under: Uncategorized | Leave a Comment