Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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"

Change History (6)

comment:1 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In bfe7377adbc0d10dc553a317671c193dce692ad3:

Fixed #21490 -- Fixed custom admin URL reverse example.

Thanks glarrain for the report.

comment:2 by Tim Graham <timograham@…>, 11 years ago

In af65860c5bc8f5efb76df9078284996cf55114f5:

[1.6.x] Fixed #21490 -- Fixed custom admin URL reverse example.

Thanks glarrain for the report.

Backport of bfe7377adb from master

comment:3 by Tim Graham <timograham@…>, 11 years ago

In 0934894976042033d74f809cefa229b82cff85f2:

[1.5.x] Fixed #21490 -- Fixed custom admin URL reverse example.

Thanks glarrain for the report.

Backport of bfe7377adb from master

comment:4 by Tim Graham <timograham@…>, 11 years ago

In 03bc0a8ac5b465a9a1ec88dedb0a2f4bd91dd547:

Fixed typo in previous commit; refs #21490.

comment:6 by Tim Graham <timograham@…>, 11 years ago

In c0c77955629b27869ba78b91e1cb9b057860a3fc:

[1.5.x] Fixed typo in previous commit; refs #21490.

Backport of 03bc0a8ac5 from master

comment:5 by Tim Graham <timograham@…>, 11 years ago

In df18cc632cd78d575f434310724034630cc84304:

[1.6.x] Fixed typo in previous commit; refs #21490.

Backport of 03bc0a8ac5 from master

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