Try the {% url %} tag:
http://www.djangoproject.com/documentation/templates/#urltom On Jun 27, 2007, at 6:33 PM, Ryan K wrote: > > What is the best form of a link in my Django site's templates? For > example, I have a base.html which serves as the base template for all > others. It contains links that are relative to the current directory > like <a href="../manage">Manage</a>. However, when I am at a page like > http://example.com/mydjangosite/manage/edit/23123 (editing the object > with id 23123) the same link above is instead pointing to > http://example.com/mydjangosite/manage/manage. I constantly have to > deploy this application to the main server but normally I work on it > locally, so absolute links would be a pain. Should I use templated > URLs (e.g. <a href="{{base_url}}/manage">Manage</a>) for my links or > is there a better way? > > Thanks, > Ryan > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

