Ticket #10886: reverse.patch

File reverse.patch, 752 bytes (added by dc, 16 years ago)
  • docs/ref/contrib/admin/index.txt

     
    12881288
    12891289    >>> from django.core import urlresolvers
    12901290    >>> c = Choice.objects.get(...)
    1291     >>> change_url = urlresolvers.reverse('admin_polls_choice_change', (c.id,))
     1291    >>> change_url = urlresolvers.reverse('admin_polls_choice_change', args=(c.id,))
    12921292
    12931293However, if the admin instance was named ``custom``, you would need to call::
    12941294
    1295     >>> change_url = urlresolvers.reverse('custom_admin_polls_choice_change', (c.id,))
     1295    >>> change_url = urlresolvers.reverse('custom_admin_polls_choice_change', args=(c.id,))
Back to Top