Code

Ticket #17006: modeladmin_get_form.patch

File modeladmin_get_form.patch, 709 bytes (added by nkuttler, 21 months ago)
  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index f28aa46..aae694a 100644
    a b templates used by the :class:`ModelAdmin` views: 
    11131113 
    11141114        (r'^my_view/$', self.admin_site.admin_view(self.my_view, cacheable=True)) 
    11151115 
     1116.. method:: ModelAdmin.get_form(self, request, obj=None, **kwargs) 
     1117 
     1118    Returns a ``Form`` class for use in the admin add and change views, see 
     1119    :meth:`add_view` and :meth:`change_view`. 
     1120 
    11161121.. method:: ModelAdmin.formfield_for_foreignkey(self, db_field, request, **kwargs) 
    11171122 
    11181123    The ``formfield_for_foreignkey`` method on a ``ModelAdmin`` allows you to