Created
May 21, 2013 23:29
-
-
Save doubleo2/5624110 to your computer and use it in GitHub Desktop.
Examples of valid url template tags in Django 1.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Standard 1.4 urls | |
{% url path.to.some_view v1 v2 %} | |
{% url path.to.some_view arg1=v1 arg2=v2 %} | |
{% url app_views.client client.id %} | |
{% url path.to.view arg arg2 as the_url %} | |
{% url path.to.view as the_url %} | |
# Namespaced 1.4 urls | |
{% url myapp:view-name %} | |
{% url myapp:path.to.some_view v1 v2 %} | |
{% url myapp:path.to.some_view arg1=v1 arg2=v2 %} | |
{% url myapp:app_views.client client.id %} | |
{% url myapp:path.to.view arg arg2 as the_url %} | |
{% url myapp:path.to.view as the_url %} | |
# Standard legacy urls | |
{% url path.to.view arg,arg2 %} | |
{% url path.to.view arg, arg2 %} | |
# Namespaced legacy urls | |
{% url myapp:path.to.view arg,arg2 %} | |
{% url myapp:path.to.view arg, arg2 %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment