Ticket #21908: patch.diff

File patch.diff, 706 bytes (added by avendael, 11 years ago)

Added description of how to instantiate inline instances

  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index b44d9d6..7d85ddc 100644
    a b templates used by the :class:`ModelAdmin` views:  
    13931393    ``obj`` being edited (or ``None`` on an add form) and is expected to return
    13941394    a ``list`` or ``tuple`` of :class:`~django.contrib.admin.InlineModelAdmin`
    13951395    objects, as described below in the :class:`~django.contrib.admin.InlineModelAdmin`
    1396     section.
     1396    section. Inline classes should be instantiated like so:
     1397
     1398        return [inline(self.model, self.admin_site) for inline in self.inlines]
    13971399
    13981400.. method:: ModelAdmin.get_urls()
    13991401
Back to Top