On Aug 18, 11:57 am, Javier Guerra <jav...@guerrag.com> wrote: > On Tue, Aug 18, 2009 at 11:49 AM, Sydney Weidman<s...@plug.ca> wrote: > > I'm moving some Django applications that used to be served from the > > root of the site to a sub-URL like /apps. Do I have to change every > > template that contains a reference to /app1/blah to /apps/app1/blah in > > every template? Is there a centralized/better/prescribed way to do > > this? > > there shouldn't be any URL inthe templates, either use {% url ... %} > for linking to views, or {{MEDIA_URL}}/relative/path for media > content. > > -- > Javier
Thanks for the suggestion. That does seem like the right way to do things and it does work for most of my links. However, when I have a view defined in my urls that I would like to link to the admin interface like so: from django.contrib import admin ... (r'^admin/(.*)', admin.site.root), if I try putting a tag in like: <li><a href="{% url admin.site.root %}">Admin</a> Django complains that there is no reverse match because the matching view has parameters and I'm not passing the url tag any arguments. How would I pass the (.*) group using the url template tag? Or should I be passing something else? Thanks again for your help. - syd --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---