start_django
Starts a Django application in a dedicated daemon thread and manages its execution lifecycle using a reloader. It ensures terminal echo is enabled and continuously runs the reloader until a stop signal is received.
def start_django(
reloader: object,
main_func: callable,
*args: any,
**kwargs: any
) - > null
Starts the Django application in a dedicated background thread and manages its lifecycle using a reloader mechanism.
Parameters
| Name | Type | Description |
|---|---|---|
| reloader | object | The reloader instance responsible for monitoring file changes and signaling when the process should stop. |
| main_func | callable | The primary entry point function for the Django application to be executed in the background thread. |
| *args | any | Variable positional arguments passed directly to the main_func. |
| **kwargs | any | Variable keyword arguments passed directly to the main_func. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned as the function enters a monitoring loop until the reloader signals a stop. |