/django/contrib/gis/management/base.py

https://code.google.com/p/mango-py/ · Python · 15 lines · 9 code · 3 blank · 3 comment · 1 complexity · 31a7cf05b44553cfdfa8cb0b8982d117 MD5 · raw file

  1. from django.core.management.base import BaseCommand, CommandError
  2. class ArgsCommand(BaseCommand):
  3. """
  4. Command class for commands that take multiple arguments.
  5. """
  6. args = '<arg arg ...>'
  7. def handle(self, *args, **options):
  8. if not args:
  9. raise CommandError('Must provide the following arguments: %s' % self.args)
  10. return self.handle_args(*args, **options)
  11. def handle_args(self, *args, **options):
  12. raise NotImplementedError()