#9760: Documentation should warn that mixing positional and keyword arguments in
url tag does not work
-----------------------------+----------------------------------------------
Reporter: eibaan | Owner: nobody
Status: new | Milestone:
Component: Template system | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
-----------------------------+----------------------------------------------
#8764 makes it clear that the {{{url}}} tag cannot mix args and kwargs
however the documentation isn't clear about this and actually, the
[http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url example]
shown is one that mixes positional and keyword arguments.
I'd suggest to rephrase this like so:
{{{
{% url path.to.some_view arg1,arg2 %}
or
{% url path.to.some_view name1=value1,name2=value2 %}
The first argument is a path to a view function in the format
package.package.module.function. Additional arguments are optional
and should be comma-separated values that will be used as either
positional or keyword arguments in the URL. Do not mix positional
and keyword arguments in on statement. All arguments required by
the URLconf should be present.
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/9760>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---