Opened 18 years ago
Closed 18 years ago
#5702 closed (worksforme)
Django Documentation defect: missed 'name=' in - url_dispatch/#naming-url-patterns
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Keywords: | Documentation | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Here’s the above example, rewritten to used named URL patterns:
urlpatterns = patterns('',
url(r'/archive/(\d{4})/$', archive, name="full-archive"),
url(r'/archive-summary/(\d{4})/$', archive, {'summary': True}, "arch-summary"),
)
it missed 'name=', should be:
Here’s the above example, rewritten to used named URL patterns:
urlpatterns = patterns('',
url(r'/archive/(\d{4})/$', archive, name="full-archive"),
url(r'/archive-summary/(\d{4})/$', archive, {'summary': True}, name="arch-summary"),
)
Attachments (1)
Change History (2)
by , 18 years ago
comment:1 by , 18 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The
nameargument isn't "keyword-only" (in fact, there's no such thing in Python currently); so long as it's fourth in the parameter list, it can be passed as a position argument like any other Python argment.