django
dev_tool.commands.django
log = logging.getLogger(__name__)
module-attribute
DjangoCommandGroup
Bases: CommandGroup
A command group for Django operations.
This class provides commands for running Django servers, managing migrations, creating superusers, and executing tests and coverage analysis.
The constructor for the DjangoCommandGroup class.
This method initializes the command group with required services and registers all command methods.
Parameters:
-
coverage(CoverageService) –The coverage service for code coverage analysis.
-
django(DjangoService) –The Django service for Django operations.
-
docker(DockerService) –The Docker service for container management.
-
postgres(PostgresService) –The PostgreSQL service for database operations.
-
profiling(ProfilingService) –The Profiling service for testing performance.
-
unittest(UnitTestService) –The unittest service for running tests.
Source code in dev_tool/commands/django.py
coverage = coverage
instance-attribute
django = django
instance-attribute
docker = docker
instance-attribute
postgres = postgres
instance-attribute
profiling = profiling
instance-attribute
unittest = unittest
instance-attribute
__str__
The string representation of the command group.
This method returns the category name for the command group.
Returns:
-
str–The category name as a string.
run_server
A command that opens a submenu for server options.
This method returns a menu for selecting different server configurations.
Returns:
-
Menu–A submenu for selecting server options.
Source code in dev_tool/commands/django.py
run_command
A command that opens a submenu for common Django commands.
This method returns a menu for frequently used Django management commands.
Returns:
-
Menu–A submenu for Django commands.
Source code in dev_tool/commands/django.py
testing
A command that opens a submenu for testing options.
This method returns a menu for test-related commands.
Returns:
-
Menu–A submenu for testing options.