Opened 14 years ago

Closed 14 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


#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 arg1,arg2 %}
{% url 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 Changed 14 years ago by Jacob

Resolution: duplicate
Status: newclosed

This is a duplicate of #8764.

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