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
| Attribute | Type | Description |
|---|---|---|
| help | string = "Runs a development server with data from the given fixture(s)." | Runs a development server with data from the given fixture(s). |
| requires_system_checks | list = [] | 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
| Name | Type | Description |
|---|---|---|
| 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
| Type | Description |
|---|---|
null | Nothing 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
| Name | Type | Description |
|---|---|---|
| fixture_labels | tuple | A sequence of file paths or names identifying the Django fixtures to be loaded into the test database. |
| options | dict | A dictionary of configuration options including verbosity, interactivity, address/port settings, and IPv6 flags. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; the method starts a blocking network server process. |