Beispiel #1
0
 def handle(self, *args, **options):
     if len(args) == 0:
         print(
             "You must provide app name. For example:\n\npython manage.py scallfold my_app\n"
         )
         return
     scaffold = Scaffold(args[0], options['model'], args)
     scaffold.run()
Beispiel #2
0
    def handle(self, *args, **options):
        if len(options['app_name']) == 0:
            print("You must provide app name. For example:\n\npython manage.py scallfold my_app\n")
            return

        app_name = options['app_name'][0]
        model_data = options['model']
        if model_data:
            model_name = model_data[0]
            fields = model_data[1:]
        else:
            model_name = None
            fields = None

        scaffold = Scaffold(app_name, model_name, fields)
        scaffold.run()
Beispiel #3
0
    def handle(self, *args, **options):

        app = options['app']
        model = options['model'][0]
        myargs = options['model'][1:]
        if len(app) == 0:
            print(
                "You must provide app name. For example:\n\npython manage.py scallfold my_app\n"
            )
            return
        # import ipdb
        # ipdb.set_trace()
        scaffold = Scaffold(app, model, myargs)
        scaffold.run()
        self.stdout.write(
            self.style.SUCCESS('Successfully closed poll "%s"' % app))
Beispiel #4
0
    def handle(self, *args, **options):
        if len(options['app_name']) == 0:
            print(
                "You must provide app name. For example:\n\npython manage.py scallfold my_app\n"
            )
            return

        app_name = options['app_name'][0]
        model_data = options['model']
        if model_data:
            model_name = model_data[0]
            fields = model_data[1:]
        else:
            model_name = None
            fields = None

        scaffold = Scaffold(app_name, model_name, fields)
        scaffold.run()
Beispiel #5
0
 def handle(self, *args, **options):
     if len(args) == 0:
         print("You must provide app name. For example:\n\npython manage.py scallfold my_app\n")
         return
     scaffold = Scaffold(args[0], options['model'], args)
     scaffold.run()