Fixed #14141: docs now use the :doc: construct for links between documents.

Thanks, Ramiro Morales.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2010-08-19 19:27:44 +00:00
parent a352154e42
commit 728effcfbd
181 changed files with 1222 additions and 1525 deletions

View file

@ -1,5 +1,3 @@
.. _howto-custom-management-commands:
====================================
Writing custom django-admin commands
====================================
@ -10,7 +8,7 @@ Applications can register their own actions with ``manage.py``. For example,
you might want to add a ``manage.py`` action for a Django app that you're
distributing. In this document, we will be building a custom ``closepoll``
command for the ``polls`` application from the
:ref:`tutorial<intro-tutorial01>`.
:doc:`tutorial</intro/tutorial01>`.
To do this, just add a ``management/commands`` directory to the application.
Each Python module in that directory will be auto-discovered and registered as
@ -77,7 +75,7 @@ The new custom command can be called using ``python manage.py closepoll
The ``handle()`` method takes zero or more ``poll_ids`` and sets ``poll.opened``
to ``False`` for each one. If the user referenced any nonexistant polls, a
:class:`CommandError` is raised. The ``poll.opened`` attribute does not exist
in the :ref:`tutorial<intro-tutorial01>` and was added to
in the :doc:`tutorial</intro/tutorial01>` and was added to
``polls.models.Poll`` for this example.
The same ``closepoll`` could be easily modified to delete a given poll instead
@ -99,7 +97,7 @@ must be added to :attr:`~BaseCommand.option_list` like this:
# ...
In addition to being able to add custom command line options, all
:ref:`management commands<ref-django-admin>` can accept some
:doc:`management commands</ref/django-admin>` can accept some
default options such as :djadminopt:`--verbosity` and :djadminopt:`--traceback`.
Command objects