Graham,

> ...When mounting at a sub URL of site, that sub URL should not be a  
> part of the patterns in urls.py... ...That you may have had to do  
> this with mod_python prior to Django 1.0 ...

Well, my urlpatterns as listed in my original post do work with Django  
1.0 & mod_python (they *do* explicitly list the sub URL) -- but based  
on your feedback I came up with a solution that works as I switch back  
and forth between my local mod_wsgi environment and my production  
mod_python environment.

::> settings.py section...
# URL_PREFIX = 'studio/'   # production
URL_PREFIX = ''   # development-birkin

::> urls.py section...
urlpatterns = patterns('',
   ( r'^%sadmin/(.*)' % ( settings.URL_PREFIX ),   admin.site.root ),
   ( r'^%s' % ( settings.URL_PREFIX ),    
include('studio.studio_app.urls_app') ),
   )


BTW, mod_python's days on the production server are numbered thanks to  
your fantastic work -- including mod_wsgi itself and your thorough and  
well-written documentation. It is deeply appreciated.

-Birkin
-------


On Apr 21, 2009, at 5:35 PM, Graham Dumpleton wrote:

>
> Haven't read mail properly, but first guess is as follows.
>
> When mounting at a sub URL of site, that sub URL should not be a part
> of the patterns in urls.py.
>
> Ie., this:
>
> urlpatterns = patterns('',
> ( r'^studio/admin/(.*)',   admin.site.root ),
> ( r'^studio/',   include('studio.studio_app.urls_app') ),
> )
>
> should be something like:
>
> urlpatterns = patterns('',
> ( r'^admin/(.*)',   admin.site.root ),
> ( r'^',   include('studio.studio_app.urls_app') ),
> )
>
> Check Django documentation for exactly what it should be as I can't  
> remember.
>
> That you may have had to do this with mod_python prior to Django 1.0
> is because mod_python is broken in part.
>
> Do not do the same thing for mod_wsgi.
>
> So, fix up your urls.py and undo WSGI application you added which was
> only valid for Django < 1.0 and try again per instructions.
>
> Graham



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to modwsgi@googlegroups.com
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to