Opened 16 years ago

Closed 16 years ago

#9760 closed (duplicate)

Documentation should warn that mixing positional and keyword arguments in url tag does not work

Reported by: eibaan Owned by: nobody
Component: Template system Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

#8764 makes it clear that the url tag cannot mix args and kwargs however the documentation isn't clear about this and actually, the 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.

Change History (1)

comment:1 by Jacob, 16 years ago

Resolution: duplicate
Status: newclosed

This is a duplicate of #8764.

Note: See TracTickets for help on using tickets.
Back to Top