Author: ramiro
Date: 2010-12-31 17:02:07 -0600 (Fri, 31 Dec 2010)
New Revision: 15124

Modified:
   django/trunk/docs/ref/contrib/admin/index.txt
   django/trunk/docs/ref/contrib/contenttypes.txt
Log:
Fixed #13307 -- Enhanced the generic inlines documentation by mentioning the 
concrete Generic{Tabular,Stacked}Inline classes that should be used. Thanks 
loki77 for the report.

Modified: django/trunk/docs/ref/contrib/admin/index.txt
===================================================================
--- django/trunk/docs/ref/contrib/admin/index.txt       2010-12-31 15:48:51 UTC 
(rev 15123)
+++ django/trunk/docs/ref/contrib/admin/index.txt       2010-12-31 23:02:07 UTC 
(rev 15124)
@@ -1364,6 +1364,8 @@
 Now your admin site is set up to edit ``Membership`` objects inline from
 either the ``Person`` or the ``Group`` detail pages.
 
+.. _using-generic-relations-as-an-inline:
+
 Using generic relations as an inline
 ------------------------------------
 
@@ -1380,9 +1382,12 @@
         name = models.CharField(max_length=100)
 
 If you want to allow editing and creating ``Image`` instance on the ``Product``
-add/change views you can simply use ``GenericInlineModelAdmin`` provided by
-``django.contrib.contenttypes.generic``. In your ``admin.py`` for this
-example app::
+add/change views you can use ``GenericTabularInline`` or
+``GenericStackedInline`` (both subclasses of ``GenericInlineModelAdmin``)
+provided by ``django.contrib.contenttypes.generic``, they implement tabular and
+stacked visual layouts for the forms representing the inline objects
+respectively just like their non-generic counterparts and behave just like any
+other inline. In your ``admin.py`` for this example app::
 
     from django.contrib import admin
     from django.contrib.contenttypes import generic
@@ -1399,10 +1404,8 @@
 
     admin.site.register(Product, ProductAdmin)
 
-``django.contrib.contenttypes.generic`` provides both a 
``GenericTabularInline``
-and ``GenericStackedInline`` and behave just like any other inline. See the
-:doc:`contenttypes documentation </ref/contrib/contenttypes>` for more specific
-information.
+See the :doc:`contenttypes documentation </ref/contrib/contenttypes>` for more
+specific information.
 
 Overriding Admin Templates
 ==========================

Modified: django/trunk/docs/ref/contrib/contenttypes.txt
===================================================================
--- django/trunk/docs/ref/contrib/contenttypes.txt      2010-12-31 15:48:51 UTC 
(rev 15123)
+++ django/trunk/docs/ref/contrib/contenttypes.txt      2010-12-31 23:02:07 UTC 
(rev 15124)
@@ -369,12 +369,15 @@
 Generic relations in forms and admin
 ------------------------------------
 
-:mod:`django.contrib.contenttypes.generic` provides both a
-:class:`~django.contrib.contenttypes.generic.GenericInlineFormSet`
-and :class:`~django.contrib.contenttypes.generic.GenericInlineModelAdmin`.
+:mod:`django.contrib.contenttypes.generic` provides
+:class:`~django.contrib.contenttypes.generic.GenericInlineFormSet`,
+:class:`~django.contrib.contenttypes.generic.GenericTabularInline`
+and :class:`~django.contrib.contenttypes.generic.GenericStackedInline`
+(the last two subclasses of 
:class:`~django.contrib.contenttypes.generic.GenericInlineModelAdmin`).
 This enables the use of generic relations in forms and the admin. See the
 :doc:`model formset </topics/forms/modelforms>` and
-:doc:`admin </ref/contrib/admin/index>` documentation for more information.
+:ref:`admin <using-generic-relations-as-an-inline>` documentation for more
+information.
 
 .. class:: generic.GenericInlineModelAdmin
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to