I'm using Django 0.96 for a project, and the url tag does not have all the capabilities I need.
I want a way to persist all or some of the GET parameters between requests. I also want a way to add to the current url a list of extra parameters, or nullify certain parameters.
In this snippet I am defining 2 tags ... link_persist and link_add.
It only works with Django 0.96, as the API changed ... but maybe a good soul can fix it for 1.0, as I haven't had any time available.
A tip for usage: if you specify a parameter as being the empty string, or None, the parameter will be removed from the link. When you specify a parameter already available in GET, it will replace it.
Two template tags (I keep them in an app called "utils") handy for building menus out of flatpages. I only have two levels of hierarchy, and the frontpage is dynamic, so that's what it does. There is some flexibility, however, in that you can change the regex that defines a "root" page.
You can pass it the flatpage object that is normally given to a flatpage template, or you can pass it a string (for any other page).
Deliberatley does not create any markup -- flexibility is key, so it adds the list of root urls or child urls as a name in the current context. You get to pick the name.
Please visit the [GitHub archive](http://wiki.github.com/0sn/nameremoved/flatpages) where i keep this up to date, there's a better explanation and you can see it in use.