James Bennett wrote:
However, in your specific case I wonder if it wouldn't be better to
just have a separate settings file
Another approach (simpler in my view) is to have a middleware like this:
class EmergencyMiddleware:
def process_request(request):
return render_to_response('emergency.html', {})
And comment/uncomment it in the settings file when needed:
MIDDLEWARE_CLASSES = (
# myproject.middleware.EmergencyMiddleware,
...,
...,
)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---