Detect runserver in settings.py?
Hello,
Inside of my settings.py I'd like to know whether I am running under
the development server (as in "python manage.py runserver") or in
another context. For instance, I might want to set DEBUG or some
paths based on it.
I've had trouble finding documentation on it. For instance, the
discussion here relies on settings.py having access to the request (or
in other responses to following some individual's conventions):
http://stackoverflow.com/questions/1291755/how-can-i-tell-whether-my-django-application-is-running-on-development-server-or
And the discussion here does not mention the issue, and it is where I
would expect to find the "recommended" approach:
https://code.djangoproject.com/wiki/SplitSettings
I expect I'm missing something perfectly obvious. I'd be grateful for
a tip-off about what it is.
Thanks,
Jim
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home