summaryrefslogtreecommitdiff
path: root/docs/ref/contrib
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 23:34:03 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-03-31 23:34:03 +0000
commit516051bfd2b537f441c46359cce7eacbf15fc4b8 (patch)
treec518cb5727dcbbdeec08bf849e94bdfa7b5e36a7 /docs/ref/contrib
parent15becf23a9e4c9b230745738d2d42f6ab8f0f031 (diff)
A whole lotta documentation fixes: Fixes #8704, #8826, #8980, #9243, #9343, #9529,
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/contrib')
-rw-r--r--docs/ref/contrib/admin/index.txt15
-rw-r--r--docs/ref/contrib/comments/index.txt7
-rw-r--r--docs/ref/contrib/contenttypes.txt8
-rw-r--r--docs/ref/contrib/formtools/form-wizard.txt2
4 files changed, 25 insertions, 7 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 7f71aca450..4592eab862 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -832,8 +832,17 @@ It is important you use a ``ModelForm`` here otherwise things can break. See the
============================
The admin interface has the ability to edit models on the same page as a
-parent model. These are called inlines. You can add them to a model by
-specifying them in a ``ModelAdmin.inlines`` attribute::
+parent model. These are called inlines. Suppose you have these two models::
+
+ class Author(models.Model):
+ name = models.CharField(max_length=100)
+
+ class Book(models.Model):
+ author = models.ForeignKey(Author)
+ title = models.CharField(max_length=100)
+
+You can edit the books authored by an author on the author page. You add
+inlines to a model by specifying them in a ``ModelAdmin.inlines``::
class BookInline(admin.TabularInline):
model = Book
@@ -1165,7 +1174,7 @@ Hooking ``AdminSite`` instances into your URLconf
The last step in setting up the Django admin is to hook your ``AdminSite``
instance into your URLconf. Do this by pointing a given URL at the
-``AdminSite.root`` method.
+``AdminSite.urls`` method.
In this example, we register the default ``AdminSite`` instance
``django.contrib.admin.site`` at the URL ``/admin/`` ::
diff --git a/docs/ref/contrib/comments/index.txt b/docs/ref/contrib/comments/index.txt
index 10a7dcf00f..36151d5fbf 100644
--- a/docs/ref/contrib/comments/index.txt
+++ b/docs/ref/contrib/comments/index.txt
@@ -155,9 +155,10 @@ A complete form might look like::
{% get_comment_form for event as form %}
<form action="{% comment_form_target %}" method="POST">
{{ form }}
- <p class="submit">
- <input type="submit" name="preview" class="submit-post" value="Preview">
- </p>
+ <tr>
+ <td></td>
+ <td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
+ </tr>
</form>
Be sure to read the `notes on the comment form`_, below, for some special
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt
index 42a8a8142b..23188c67e7 100644
--- a/docs/ref/contrib/contenttypes.txt
+++ b/docs/ref/contrib/contenttypes.txt
@@ -324,6 +324,14 @@ same types of lookups manually::
... object_id=b.id)
[<TaggedItem: django>, <TaggedItem: python>]
+Note that if the model with a :class:`~django.contrib.contenttypes.generic.GenericForeignKey`
+that you're referring to uses a non-default value for ``ct_field`` or ``fk_field``
+(e.g. the :mod:`django.contrib.comments` app uses ``ct_field="object_pk"``),
+you'll need to pass ``content_type_field`` and ``object_id_field`` to
+:class:`~django.contrib.contenttypes.generic.GenericRelation`.::
+
+ comments = generic.GenericRelation(Comment, content_type_field="content_type", object_id_field="object_pk")
+
Note that if you delete an object that has a
:class:`~django.contrib.contenttypes.generic.GenericRelation`, any objects
which have a :class:`~django.contrib.contenttypes.generic.GenericForeignKey`
diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt
index cf57e79884..c81c24242a 100644
--- a/docs/ref/contrib/formtools/form-wizard.txt
+++ b/docs/ref/contrib/formtools/form-wizard.txt
@@ -290,7 +290,7 @@ Advanced FormWizard methods
.. method:: FormWizard.render_template
Renders the template for the given step, returning an
- :class:`~django.http.HttpResponseRedirect` object.
+ :class:`~django.http.HttpResponse` object.
Override this method if you want to add a custom context, return a different
MIME type, etc. If you only need to override the template name, use