On Mon, Nov 13, 2006 at 08:09:31PM -0000, yary wrote: > > You can set up your main site urls.py to read something like: > > urlpatterns = patterns('', > (r'^app1/', include('app1.urls')) # Pass to app1 > (r'^app2/', include('app2.urls')) # Pass to app2 > ) > > and within app1, have a urls.py like this: > > urlpatterns = patterns('', > (r'^view/(?P<item_id>\d+)', 'view') # call 'view" > (r'^admin/', include('django.contrib.admin.urls')), > ) > > Then visiting 'http://example.com/app1/view/23' will do as you expect, > and you can rename the apps by changing only the site's urls.py and not > your apps urls.py and templates (if they use relative URLs)
Doesn't this hide all apps settings? we would end up in one single configuration, the main one... I was rather thinking at adding a variable in the context using something in the middleware (I this I saw the way to add to context), that would allow me to use a "PREFIX" variable to all URL or postprocess all rendered template to substitute relative urls adding the PREFIX. sandro *:-) -- Sandro Dentella *:-) http://www.tksql.org TkSQL Home page - My GPL work --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---