def handle(self, *args, **options):
        """
        Alter the tables
        """
        from categories.migration import drop_field
        if 'app_name' not in options or 'model_name' not in options or 'field_name' not in options:
            raise CommandError("You must specify an Application name, a Model name and a Field name")

        drop_field(options['app_name'], options['model_name'], options['field_name'])
    def handle(self, *args, **options):
        """
        Alter the tables
        """

        from categories.migration import drop_field
        if len(args) != 3:
            print("You must specify an Application name, a Model name and a Field name")

        drop_field(*args)
Beispiel #3
0
    def handle(self, *args, **options):
        """
        Alter the tables
        """

        from categories.migration import drop_field
        if len(args) != 3:
            print(
                "You must specify an Application name, a Model name and a Field name"
            )

        drop_field(*args)
    def handle(self, *args, **options):
        """
        Alter the tables
        """
        from categories.migration import drop_field
        if 'app_name' not in options or 'model_name' not in options or 'field_name' not in options:
            raise CommandError(
                "You must specify an Application name, a Model name and a Field name"
            )

        drop_field(options['app_name'], options['model_name'],
                   options['field_name'])
    def handle(self, *args, **options):
        """
        Alter the tables
        """
        try:
            from south.db import db
        except ImportError:
            raise ImproperlyConfigured("South must be installed for this command to work")

        from categories.migration import drop_field
        if len(args) != 3:
            print("You must specify an Application name, a Model name and a Field name")

        drop_field(*args)
    def handle(self, *args, **options):
        """
        Alter the tables
        """
        try:
            from south.db import db
        except ImportError:
            raise ImproperlyConfigured(
                "South must be installed for this command to work")

        from categories.migration import drop_field
        if len(args) != 3:
            print "You must specify an Application name, a Model name and a Field name"

        drop_field(*args)