Author: ramiro
Date: 2011-01-21 15:00:39 -0600 (Fri, 21 Jan 2011)
New Revision: 15279
Modified:
django/trunk/django/core/management/commands/makemessages.py
Log:
Converted makemessages management command to a NoArgsCommand.
Modified: django/trunk/django/core/management/commands/makemessages.py
===================================================================
--- django/trunk/django/core/management/commands/makemessages.py
2011-01-21 20:47:56 UTC (rev 15278)
+++ django/trunk/django/core/management/commands/makemessages.py
2011-01-21 21:00:39 UTC (rev 15279)
@@ -7,7 +7,7 @@
from optparse import make_option
from subprocess import PIPE, Popen
-from django.core.management.base import CommandError, BaseCommand
+from django.core.management.base import CommandError, NoArgsCommand
from django.utils.text import get_text_list
pythonize_re = re.compile(r'(?:^|\n)\s*//')
@@ -298,8 +298,8 @@
raise CommandError("errors happened while running
msgattrib\n%s" % errors)
-class Command(BaseCommand):
- option_list = BaseCommand.option_list + (
+class Command(NoArgsCommand):
+ option_list = NoArgsCommand.option_list + (
make_option('--locale', '-l', default=None, dest='locale',
help='Creates or updates the message files only for the given
locale (e.g. pt_BR).'),
make_option('--domain', '-d', default='django', dest='domain',
@@ -325,10 +325,7 @@
requires_model_validation = False
can_import_settings = False
- def handle(self, *args, **options):
- if len(args) != 0:
- raise CommandError("Command doesn't accept any arguments")
-
+ def handle_noargs(self, *args, **options):
locale = options.get('locale')
domain = options.get('domain')
verbosity = int(options.get('verbosity'))
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.