2011-12-23 06:38:02 +08:00
|
|
|
from django.core.management.templates import TemplateCommand
|
2007-10-28 00:09:52 +08:00
|
|
|
|
2007-08-16 14:06:55 +08:00
|
|
|
|
2011-12-23 06:38:02 +08:00
|
|
|
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."
|
|
|
|
)
|
2014-06-07 04:39:33 +08:00
|
|
|
missing_args_message = "You must provide an application name."
|
2007-08-16 14:06:55 +08:00
|
|
|
|
2014-06-07 04:39:33 +08:00
|
|
|
def handle(self, **options):
|
2017-05-30 15:55:38 +08:00
|
|
|
app_name = options.pop('name')
|
|
|
|
target = options.pop('directory')
|
2017-01-21 21:13:44 +08:00
|
|
|
super().handle('app', app_name, target, **options)
|