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
You can determine whether you're running under WSGI (mod_wsgi, gunicorn, waitress, etc.) vs. manage.py (runserver, test, migrate, etc.) or anything else:
WSGI
manage.py
import sys WSGI = 'django.core.wsgi' in sys.modules