app/django/contrib/gis/management/base.py
author Daniel Hans <Daniel.M.Hans@gmail.com>
Sat, 14 Nov 2009 23:27:03 +0100
changeset 3091 a48f4e860f7b
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Tasks may be deleted by pressing 'Delete' button on the edit view. An organization admin may delete a task entity, if the task is not claimed by anyone. Issue 695 fixed.

from django.core.management.base import BaseCommand, CommandError

class ArgsCommand(BaseCommand):
    """
    Command class for commands that take multiple arguments.
    """
    args = '<arg arg ...>'

    def handle(self, *args, **options):
        if not args:
            raise CommandError('Must provide the following arguments: %s' % self.args)
        return self.handle_args(*args, **options)

    def handle_args(self, *args, **options):
        raise NotImplementedError()