#21490 closed Bug (fixed)
Wrong example in docs for reversing Admin URLs using custom instance
Reported by: | German Larrain | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
This example in the docs
change_url = urlresolvers.reverse('custom:polls_choice_change', args=(c.id,))
should be
change_url = urlresolvers.reverse('admin:polls_choice_change', args=(c.id,), current_app='custom')
The paragraph introducing the example is correct: "If you want to find a URL in a specific admin instance, provide the name of that instance as a current_app hint to the reverse call"
Note:
See TracTickets
for help on using tickets.
In bfe7377adbc0d10dc553a317671c193dce692ad3: