James Bennett wrote:
On 1/8/07, Robin Becker <[EMAIL PROTECTED]> wrote:
Is there any obvious way to get the dispatch mechanism to behave
differently
under specific circumstances?
Not too long ago, there was some new functionality checked in to trunk
which allows you to tell Django to use a different URLConf on a
per-request basis, by having request middleware assign to
'request.urlconf' -- Django will then look at that for the root
URLConf module to use, instead of the one specified in settings. The
use case which inspired that was being able to switch URLConfs based
on the value of the HTTP 'Host' header, but you might be able to adapt
it to your needs.
However, in your specific case I wonder if it wouldn't be better to
just have a separate settings file with a different value for
ROOT_URLCONF; when you need to upgrade, switch to that file
temporarily, and then switch back when you're done. You're going to
have to do server restarts either way if you're making code changes,
so this seems the logical thing to do.
thanks very useful stuff.
--
Robin Becker
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---