Skip to main content

Command

This class provides a management command that launches a development server populated with data from specified fixtures. It automatically creates a temporary test database, imports the provided data, and starts the server on a configurable address and port. The command disables auto-reloading to ensure stable execution while maintaining the test database for post-run exploration.

Attributes

AttributeTypeDescription
helpstring = "Runs a development server with data from the given fixture(s)."Runs a development server with data from the given fixture(s).
requires_system_checkslist = []A list of system checks to run before executing the command, which is empty for this class to skip validation.

Methods


add_arguments()

@classmethod
def add_arguments(
parser: [CommandParser](../../base/commandparser.md?sid=django_core_management_base_commandparser)
) - > null

Configures the command line argument parser with options for fixture paths, interactive prompts, network addresses, and IPv6 support.

Parameters

NameTypeDescription
parser[CommandParser](../../base/commandparser.md?sid=django_core_management_base_commandparser)The argument parser instance to which the command-specific arguments will be added.

Returns

TypeDescription
nullNothing is returned; the parser object is modified in place.

handle()

@classmethod
def handle(
fixture_labels: tuple,
options: dict
) - > null

Creates a temporary test database, populates it with data from the specified fixtures, and starts a development server.

Parameters

NameTypeDescription
fixture_labelstupleA sequence of file paths or names identifying the Django fixtures to be loaded into the test database.
optionsdictA dictionary of configuration options including verbosity, interactivity, address/port settings, and IPv6 flags.

Returns

TypeDescription
nullNothing is returned; the method starts a blocking network server process.