In the django template language, you can use {% url [viewname] [args] %} to generate a url to a specific view with parameters. How can you programatically do the same in python code?
What I need is to create a list of menu items, each item has name, url, and active (whether it's the current page or not). This because it will be a lot cleaner to do this in python than the template language.