django1/django/core/management/commands/startapp.py

15 lines
503 B
Python
Raw Normal View History

from django.core.management.templates import TemplateCommand
class Command(TemplateCommand):
2016-03-29 06:33:29 +08:00
help = (
"Creates a Django app directory structure for the given app name in "
"the current directory or optionally in the given directory."
)
missing_args_message = "You must provide an application name."
def handle(self, **options):
app_name = options.pop('name')
target = options.pop('directory')
super().handle('app', app_name, target, **options)