generator
django_spire.core.management.commands.spire_startapp_pkg.generator
AppGenerator
Generates Django app structures from templates.
This class handles the creation of new Django apps by copying template files and processing them with user-provided configuration.
Initializes the AppGenerator with required dependencies.
Parameters:
-
filesystem(FileSystem) –File system for file operations.
-
processor(TemplateProcessor) –Template processor for replacing placeholders.
-
reporter(Reporter) –Reporter for user feedback and output.
-
path_config(PathConfig) –Configuration containing template paths.
Source code in django_spire/core/management/commands/spire_startapp_pkg/generator.py
generate
Generates a new Django app from templates.
Creates the app directory, copies template files, and processes them with user configuration. Skips generation if the app already exists.
Parameters:
-
config(AppConfig) –Configuration for the app to generate.
Source code in django_spire/core/management/commands/spire_startapp_pkg/generator.py
TemplateGenerator
Generates HTML templates for Django apps.
This class handles the creation of HTML template files including forms, cards, pages, and items for new Django apps.
Initializes the TemplateGenerator with required dependencies.
Parameters:
-
filesystem(FileSystem) –File system for file operations.
-
processor(TemplateProcessor) –Template processor for replacing placeholders.
-
reporter(Reporter) –Reporter for user feedback and output.
-
path_config(PathConfig) –Configuration containing template paths.
Source code in django_spire/core/management/commands/spire_startapp_pkg/generator.py
generate
Generates HTML templates for a new Django app.
Creates the template directory, copies template files, and processes them with user configuration. Skips generation if templates already exist.
Parameters:
-
config(AppConfig) –Configuration for the templates to generate.