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 is True then it’s running on development server, but I’d prefer to know for sure than relying on convention.
How can I be certain that my application is running on development server or
Share
Of course,
wsgi.file_wrappermight be set on META, and have a class from a module nameddjango.core.servers.basehttpby extreme coincidence on another server environment, but I hope this will have you covered.By the way, I discovered this by making a syntatically invalid template while running on the development server, and searched for interesting stuff on the
Tracebackand theRequest informationsections, so I’m just editing my answer to corroborate with Nate’s ideas.