#10886 closed (fixed)
"Reversing Admin URLs" section provides invalid examples
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
Description ¶
urlresolvers.reverse('admin_polls_choice_change', (c.id,))
should be:
urlresolvers.reverse('admin_polls_choice_change', args=[c.id,])
otherwise (c.id,) is interpreted as the urlconf argument, and an error such as:
AttributeError: 'int' object has no attribute 'regex'
is raised, since (c.id,) is not a urlconf. The second example with custom_admin_... should also be changed.
Change History (7)
comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
Attachment: | reverse.patch added |
---|
comment:2 by , 16 years ago
Has patch: | set |
---|
comment:3 by , 16 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in r10776.