Skip to content

Commit

Permalink
Show how to retrieve the value passed to the atom argument of a rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurClemens committed Dec 15, 2013
1 parent 24a1638 commit 3a208dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/manuals/dispatch.rst
Expand Up @@ -100,6 +100,11 @@ no arguments were given. However when I add an argument::
It will render the URL ``/foo/1``, matching the second dispatch rule
and adding the argument in the creation of the URL.

In a template the value of the argument can be retrieved with the `q` variable.
In the example where the atom `var` is used::

{{ q.var }}

Note that any `extra` arguments that are given, are added as query-string parameters::

{% url rulename var=1 x="hello" %}
Expand Down

0 comments on commit 3a208dd

Please sign in to comment.