mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed broken links, round 3. refs #19516
This commit is contained in:
@@ -11,12 +11,12 @@ The built-in comment models
|
||||
|
||||
.. attribute:: content_object
|
||||
|
||||
A :class:`~django.contrib.contettypes.generic.GenericForeignKey`
|
||||
A :class:`~django.contrib.contenttypes.generic.GenericForeignKey`
|
||||
attribute pointing to the object the comment is attached to. You can use
|
||||
this to get at the related object (i.e. ``my_comment.content_object``).
|
||||
|
||||
Since this field is a
|
||||
:class:`~django.contrib.contettypes.generic.GenericForeignKey`, it's
|
||||
:class:`~django.contrib.contenttypes.generic.GenericForeignKey`, it's
|
||||
actually syntactic sugar on top of two underlying attributes, described
|
||||
below.
|
||||
|
||||
@@ -77,4 +77,3 @@ The built-in comment models
|
||||
|
||||
``True`` if the comment was removed. Used to keep track of removed
|
||||
comments instead of just deleting them.
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ Built-in moderation options
|
||||
.. attribute:: auto_close_field
|
||||
|
||||
If this is set to the name of a
|
||||
:class:`~django.db.models.fields.DateField` or
|
||||
:class:`~django.db.models.fields.DateTimeField` on the model for which
|
||||
:class:`~django.db.models.DateField` or
|
||||
:class:`~django.db.models.DateTimeField` on the model for which
|
||||
comments are being moderated, new comments for objects of that model
|
||||
will be disallowed (immediately deleted) when a certain number of days
|
||||
have passed after the date specified in that field. Must be
|
||||
@@ -117,7 +117,7 @@ Built-in moderation options
|
||||
.. attribute:: enable_field
|
||||
|
||||
If this is set to the name of a
|
||||
:class:`~django.db.models.fields.BooleanField` on the model
|
||||
:class:`~django.db.models.BooleanField` on the model
|
||||
for which comments are being moderated, new comments on
|
||||
objects of that model will be disallowed (immediately deleted)
|
||||
whenever the value of that field is ``False`` on the object
|
||||
|
||||
@@ -234,13 +234,15 @@ lookup::
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
Prior to Django 1.5 :meth:`~ContentTypeManager.get_for_model()` and
|
||||
:meth:`~ContentTypeManager.get_for_models()` always returned the
|
||||
:class:`~django.contrib.contenttypes.models.ContentType` associated with the
|
||||
concrete model of the specified one(s). That means there was no way to retreive
|
||||
the :class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
|
||||
Prior to Django 1.5,
|
||||
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model` and
|
||||
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_models`
|
||||
always returned the :class:`~django.contrib.contenttypes.models.ContentType`
|
||||
associated with the concrete model of the specified one(s). That means there
|
||||
was no way to retreive the
|
||||
:class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
|
||||
using those methods. As of Django 1.5 you can now pass a boolean flag –
|
||||
respectively ``for_concrete_model`` and ``for_concrete_models`` – to specify
|
||||
``for_concrete_model`` and ``for_concrete_models`` respectively – to specify
|
||||
wether or not you want to retreive the
|
||||
:class:`~django.contrib.contenttypes.models.ContentType` for the concrete or
|
||||
direct model.
|
||||
|
||||
Reference in New Issue
Block a user