diff options
| author | eltronix <lt.eltronix@gmail.com> | 2016-04-26 12:56:44 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-04-26 09:24:11 -0400 |
| commit | 658ab34008c0e87f22f6fbd61ae94ee4f2aaf5c8 (patch) | |
| tree | 67d9f49ec87c529e7a8a9bbf62fd0b07c9308995 | |
| parent | a06fa6e7d35b408264ee0c2e19d2040ef54c5b4d (diff) | |
[1.9.x] Fixed reference to Question model in management command how-to.
Backport of e2cb1018cb1e8b95fbd15de53f8b2ba70e45d36b from master
| -rw-r--r-- | docs/howto/custom-management-commands.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index aee502693c..7ebf7759de 100644 --- a/docs/howto/custom-management-commands.txt +++ b/docs/howto/custom-management-commands.txt @@ -49,7 +49,7 @@ To implement the command, edit ``polls/management/commands/closepoll.py`` to look like this:: from django.core.management.base import BaseCommand, CommandError - from polls.models import Poll + from polls.models import Question as Poll class Command(BaseCommand): help = 'Closes the specified poll for voting' @@ -98,8 +98,8 @@ The new custom command can be called using ``python manage.py closepoll The ``handle()`` method takes one or more ``poll_ids`` and sets ``poll.opened`` to ``False`` for each one. If the user referenced any nonexistent polls, a :exc:`CommandError` is raised. The ``poll.opened`` attribute does not exist in -the :doc:`tutorial</intro/tutorial01>` and was added to ``polls.models.Poll`` -for this example. +the :doc:`tutorial</intro/tutorial01>` and was added to +``polls.models.Question`` for this example. .. _custom-commands-options: |
