On 3/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> <Location "/dev/">
>         SetHandler python-program
...
> <Location "/test/">
>         SetHandler python-program

The usual way to do this is to have virtual hosts and use the same
root URL on both.

Otherwise, consider having separate ROOT_URLCONF's for each to factor
out the different URL prefix.

So, if you have this:

ROOT_URLCONF='myproject.urls'

Make a devurls.py and a testurls.py, changing it based on environment
or something.

So ROOT_URLCONF='myproject.devurls'

And make devurls include the regular one, consuming the URL prefix.
devurls.py:

from django.conf.urls.defaults import *

urlpatterns = patterns('',
   (r'dev/' include('myproject.urls'),
 )


And similarly for testurls.py.

Cheers,
  Jeremy

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to