Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I get django runserver to show me DeprecationWarnings and other useful messages?

Tags:

python

django

I've recently updated my django installation from 1.2 to 1.3. On my developer system I didn't get any warnings about deprecated calls. But once I moved the code onto my production apache server, I saw many 'DeprecationWarning' messages in my apache logs. So how do I have to call runserver to these these messages too?

Currently I call it like this:

python manage.py runserver --verbosity 2
like image 907
memyself Avatar asked Jul 16 '11 18:07

memyself


People also ask

Why is Django Runserver not working?

The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

What does Django Runserver do?

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

Python 2.7 disables the display of DeprecationWarning by default

To re-enable it, set environment variable PYTHONWARNINGS to "d":

export PYTHONWARNINGS="d"; ./manage.py runserver
like image 106
chrisv Avatar answered Sep 30 '22 06:09

chrisv