summaryrefslogtreecommitdiff
path: root/docs/ref/contrib/comments
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-01-01 08:12:42 -0500
committerTim Graham <timograham@gmail.com>2013-01-02 18:50:00 -0500
commitbe1e006c581cc45ed48ae0b423e7a0a996d2199b (patch)
tree5e33669588d7c8d2a49d99f82ae87524d22a9455 /docs/ref/contrib/comments
parent61c861546bdbae694f22e2c54e9ca0f42331cae1 (diff)
[1.5.x] Fixed #19516 - Fixed remaining broken links.
Added -n to sphinx builds to catch issues going forward. Backport of 9b5f64cc6e from master.
Diffstat (limited to 'docs/ref/contrib/comments')
-rw-r--r--docs/ref/contrib/comments/custom.txt26
-rw-r--r--docs/ref/contrib/comments/example.txt4
-rw-r--r--docs/ref/contrib/comments/moderation.txt9
-rw-r--r--docs/ref/contrib/comments/signals.txt4
4 files changed, 22 insertions, 21 deletions
diff --git a/docs/ref/contrib/comments/custom.txt b/docs/ref/contrib/comments/custom.txt
index 0ef37a9a0b..b4ab65bc2d 100644
--- a/docs/ref/contrib/comments/custom.txt
+++ b/docs/ref/contrib/comments/custom.txt
@@ -66,15 +66,17 @@ In the ``models.py`` we'll define a ``CommentWithTitle`` model::
class CommentWithTitle(Comment):
title = models.CharField(max_length=300)
-Most custom comment models will subclass the :class:`Comment` model. However,
+Most custom comment models will subclass the
+:class:`~django.contrib.comments.models.Comment` model. However,
if you want to substantially remove or change the fields available in the
-:class:`Comment` model, but don't want to rewrite the templates, you could
-try subclassing from :class:`BaseCommentAbstractModel`.
+:class:`~django.contrib.comments.models.Comment` model, but don't want to
+rewrite the templates, you could try subclassing from
+``BaseCommentAbstractModel``.
Next, we'll define a custom comment form in ``forms.py``. This is a little more
tricky: we have to both create a form and override
-:meth:`CommentForm.get_comment_model` and
-:meth:`CommentForm.get_comment_create_data` to return deal with our custom title
+``CommentForm.get_comment_model()`` and
+``CommentForm.get_comment_create_data()`` to return deal with our custom title
field::
from django import forms
@@ -139,7 +141,7 @@ however.
Return the :class:`~django.db.models.Model` class to use for comments. This
model should inherit from
- :class:`django.contrib.comments.models.BaseCommentAbstractModel`, which
+ ``django.contrib.comments.models.BaseCommentAbstractModel``, which
defines necessary core fields.
The default implementation returns
@@ -170,33 +172,33 @@ however.
attribute when rendering your comment form.
The default implementation returns a reverse-resolved URL pointing
- to the :func:`post_comment` view.
+ to the ``post_comment()`` view.
.. note::
If you provide a custom comment model and/or form, but you
- want to use the default :func:`post_comment` view, you will
+ want to use the default ``post_comment()`` view, you will
need to be aware that it requires the model and form to have
certain additional attributes and methods: see the
- :func:`post_comment` view documentation for details.
+ ``django.contrib.comments.views.post_comment()`` view for details.
.. function:: get_flag_url()
Return the URL for the "flag this comment" view.
The default implementation returns a reverse-resolved URL pointing
- to the :func:`django.contrib.comments.views.moderation.flag` view.
+ to the ``django.contrib.comments.views.moderation.flag()`` view.
.. function:: get_delete_url()
Return the URL for the "delete this comment" view.
The default implementation returns a reverse-resolved URL pointing
- to the :func:`django.contrib.comments.views.moderation.delete` view.
+ to the ``django.contrib.comments.views.moderation.delete()`` view.
.. function:: get_approve_url()
Return the URL for the "approve this comment from moderation" view.
The default implementation returns a reverse-resolved URL pointing
- to the :func:`django.contrib.comments.views.moderation.approve` view.
+ to the ``django.contrib.comments.views.moderation.approve()`` view.
diff --git a/docs/ref/contrib/comments/example.txt b/docs/ref/contrib/comments/example.txt
index 2bff778c2f..4e18e37de0 100644
--- a/docs/ref/contrib/comments/example.txt
+++ b/docs/ref/contrib/comments/example.txt
@@ -136,7 +136,7 @@ Feeds
=====
Suppose you want to export a :doc:`feed </ref/contrib/syndication>` of the
-latest comments, you can use the built-in :class:`LatestCommentFeed`. Just
+latest comments, you can use the built-in ``LatestCommentFeed``. Just
enable it in your project's ``urls.py``:
.. code-block:: python
@@ -166,7 +166,7 @@ features (all of which or only certain can be enabled):
* Close comments after a particular (user-defined) number of days.
* Email new comments to the site-staff.
-To enable comment moderation, we subclass the :class:`CommentModerator` and
+To enable comment moderation, we subclass the ``CommentModerator`` and
register it with the moderation features we want. Let's suppose we want to
close comments after 7 days of posting and also send out an email to the
site staff. In ``blog/models.py``, we register a comment moderator in the
diff --git a/docs/ref/contrib/comments/moderation.txt b/docs/ref/contrib/comments/moderation.txt
index c042971d39..a7138dda53 100644
--- a/docs/ref/contrib/comments/moderation.txt
+++ b/docs/ref/contrib/comments/moderation.txt
@@ -185,15 +185,14 @@ via two methods:
be moderated using the options defined in the
``CommentModerator`` subclass. If any of the models are
already registered for moderation, the exception
- :exc:`AlreadyModerated` will be raised.
+ ``AlreadyModerated`` will be raised.
.. function:: moderator.unregister(model_or_iterable)
Takes one argument: a model class or list of model classes,
and removes the model or models from the set of models which
are being moderated. If any of the models are not currently
- being moderated, the exception
- :exc:`NotModerated` will be raised.
+ being moderated, the exception ``NotModerated`` will be raised.
Customizing the moderation system
@@ -207,8 +206,8 @@ models with an instance of the subclass.
.. class:: Moderator
- In addition to the :meth:`Moderator.register` and
- :meth:`Moderator.unregister` methods detailed above, the following methods
+ In addition to the :func:`moderator.register` and
+ :func:`moderator.unregister` methods detailed above, the following methods
on :class:`Moderator` can be overridden to achieve customized behavior:
.. method:: connect
diff --git a/docs/ref/contrib/comments/signals.txt b/docs/ref/contrib/comments/signals.txt
index 8274539ed7..ea901b6a95 100644
--- a/docs/ref/contrib/comments/signals.txt
+++ b/docs/ref/contrib/comments/signals.txt
@@ -81,8 +81,8 @@ Arguments sent with this signal:
:meth:`~django.db.models.Model.save` again.
``flag``
- The :class:`~django.contrib.comments.models.CommentFlag` that's been
- attached to the comment.
+ The ``django.contrib.comments.models.CommentFlag`` that's been attached to
+ the comment.
``created``
``True`` if this is a new flag; ``False`` if it's a duplicate flag.