From 3a208dd4015460753de5f2c8eebafb0e18272eea Mon Sep 17 00:00:00 2001 From: Arthur Clemens Date: Sun, 15 Dec 2013 01:25:29 +0100 Subject: [PATCH] Show how to retrieve the value passed to the atom argument of a rule --- doc/manuals/dispatch.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/manuals/dispatch.rst b/doc/manuals/dispatch.rst index 3cddfaebb4..eba781b110 100644 --- a/doc/manuals/dispatch.rst +++ b/doc/manuals/dispatch.rst @@ -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" %}