How can I be certain that my application is running on development server or not? I suppose I could check value of settings.DEBUG and assume if DEBUG
settings.DEBUG
DEBUG
I put the following in my settings.py to distinguish between the standard dev server and production:
import sys RUNNING_DEVSERVER = (len(sys.argv) > 1 and sys.argv[1] == 'runserver')
This also relies on convention, however.
(Amended per Daniel Magnusson's comment)