Skip to main content

Command

This class creates a Django project directory structure for a specified project name in the current directory or an optional target directory. It automatically generates a secure random secret key for the new project's settings and delegates the core creation logic to the underlying template command system.

Attributes

AttributeTypeDescription
helpstringCreates a Django project directory structure for the given project name in the current directory or optionally in the given directory.
missing_args_messagestringYou must provide a project name.

Constructor

Signature

def Command() - > null

Methods


handle()

@classmethod
def handle(
**options: dict
) - > None

Executes the project creation logic by generating a random secret key and delegating the directory structure setup to the base template command.

Parameters

NameTypeDescription
**optionsdictA dictionary of command-line arguments including 'name' for the project identity and 'directory' for the optional destination path.

Returns

TypeDescription
NoneNothing is returned; the method performs file system operations to create the project structure.