Skip to content
Branch: master
Find file Copy path
Find file Copy path
12 contributors

Users who have contributed to this file

@adrianholovaty @claudep @timgraham @graingert @freakboy3742 @PaulMcMillan @adamchainz @malcolmt @jezdez @jacobian @carljm @ChillarAnand
20 lines (14 sloc) 688 Bytes
from import TemplateCommand
from ..utils import get_random_secret_key
class Command(TemplateCommand):
help = (
"Creates a Django project directory structure for the given project "
"name in the current directory or optionally in the given directory."
missing_args_message = "You must provide a project name."
def handle(self, **options):
project_name = options.pop('name')
target = options.pop('directory')
# Create a random SECRET_KEY to put it in the main settings.
options['secret_key'] = get_random_secret_key()
super().handle('project', project_name, target, **options)
You can’t perform that action at this time.