Reputation: 3961
Does anyone know a good way to handle the debug mode dynamically in Django - settings.py
? ..
I want the debug mode to be true if the requested is eg. test.mydomain.com
and when i go to mydomain.com
the debug mode is false.
Is there a way to get the requested URL in the settings.py
file to make a IF condition?
Upvotes: 1
Views: 232
Reputation: 37904
django's settings should stay immutable. it is supposed to be so.
you better create two settings,
DEBUG=True
and create two wsgi's in your django.
and in your apache config, depending on servername, make it refer to respective wsgi.
Upvotes: 4