I'm looking for a safe method of triggering DEBUG for INTERNAL_IPS requests on a django production server without requiring the alteration of a settings.py file. Mainly to get the toolbar going for some designers to check issues on live data/media, but without relying on them to reset the settings once they have finished.
Similar to this method. hovever this only suits deployment.
in the past on php based systems I've had mydomain.com and a demo mydomaincom.myprodserver.com where the prodserver domain can automatically run debug code based on $_SERVER['HOST_NAME'] but django is lacking the easy superglobal. eg in the blog example hostname is the /etc/hostname not the vhost.
Any ideas appreciated.
Edit:
I have a workaround solution of sorts (but ideally I'd prefer a more portable one) by adding a /path/to/django_in_debug/ to the sys.path of the mydomaincom.myprodserver.com vhost entry. Then in the settings.py file
try:
from django_in_debug.settings import *
except:
DEBUG = False