On Thu, 2007-06-21 at 21:10 +0000, Rob Hudson wrote: > On Jun 21, 1:23 pm, Tyson Tate <[EMAIL PROTECTED]> wrote: > > Look at "next" and "previous" context variables. You can do: > > > > <a href="/url/page{{ next }}">Next</a> > > > > and > > > > <a href="/url/page{{ previous }}">Previous</a> > > Right, but it's the 'href="/url/..."' part that doesn't feel right to > me. If I either want to (a) re-use this template for other URLs (list > view by tag, list view by date, etc) or (b) decide later that I want / > url/ to be /foo/ in urls.py, then I have to remember to change the > template, which I don't trust myself to do.
I don't understand. If you're one /foo/bar/baz/page1/, then why can't you write <a href="../page2/"> as the link? It will work, is a well-formed URL and is independent of the prefix. Note that you must ensure your URLs are canonicalised if you use this system, though: always ending with a trailing slash, so that the "../" will go to the right place. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---