You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

startapp.py 503B

1234567891011121314
  1. from django.core.management.templates import TemplateCommand
  2. class Command(TemplateCommand):
  3. help = (
  4. "Creates a Django app directory structure for the given app name in "
  5. "the current directory or optionally in the given directory."
  6. )
  7. missing_args_message = "You must provide an application name."
  8. def handle(self, **options):
  9. app_name = options.pop('name')
  10. target = options.pop('directory')
  11. super().handle('app', app_name, target, **options)