django_utils.management.commands package¶
Submodules¶
django_utils.management.commands.admin_autogen module¶
django_utils.management.commands.base_command module¶
- class django_utils.management.commands.base_command.ChunkedCommand(*args: Any, **kwargs: Any)[source]¶
Bases:
CustomBaseCommandBatch-process a queryset in bounded, resumable chunks.
Subclasses implement
get_queryset()andhandle_instance(); the base iterates viaqueryset_iterator(memory bounded on both the client and the database), logs progress with a rate every--log-everyrows, stops after--limitrows, resumes after a known pk with--resume-from, and rolls everything back under--dry-run. On interrupt or early stop it logs the exact--resume-fromvalue to continue with.--dry-runwraps only the queryset's own database alias (self.get_queryset().db); writeshandle_instancemakes to OTHER databases are not covered and will still be committed. Also note: under--dry-run, the resume hints logged refer to work that was rolled back -- do not feed them to a real run.Deliberately out of scope: retries and parallelism. This is iterate + log + checkpoint, nothing more.
- add_arguments(parser: CommandParser) None[source]¶
Entry point for subclassed commands to add custom arguments.
- class django_utils.management.commands.base_command.CustomAppCommand(*args: Any, **kwargs: Any)[source]¶
Bases:
CustomBaseCommand,AppCommand
django_utils.management.commands.settings module¶
- class django_utils.management.commands.settings.Command(*args: Any, **kwargs: Any)[source]¶
Bases:
CustomBaseCommand- add_arguments(parser: ArgumentParser) None[source]¶
Entry point for subclassed commands to add custom arguments.
- can_import_settings = True¶
- handle(*args: Any, **options: Any) None[source]¶
The actual logic of the command. Subclasses must implement this method.
- help = 'Get a list of the current settings, any arguments given will be\n used to match the settings name (case insensitive).\n '¶
- render_output(data: dict[str, Any] | None, output_type: str | None = 'pprint', show_keys: bool = False, **options: Any) None[source]¶
- requires_model_validation = False¶