Conversation
Enhancements - Removed unused `jinja2` dependency from `pyproject.toml` and `requirements.txt`.
This change updates all template references from *.j2 to *.py-tpl to align with the new file naming convention and adds the required context for URL generation. New Features - Updated template paths to *.py-tpl for init, manage.py, settings, and component files - Added `url_type` context for URL generation templates Enhancements - Modified `create_init_file` to use `init.py-tpl` template - Updated all `create_file_from_template` calls to reference `.py-tpl` templates - Adjusted context for URL templates to include project‑specific data - Switched component URL template to `config/urls.py-tpl` Bug Fixes - None
…dering pipeline New Features - Adopted .py-tpl/.j2-tpl suffixes for generated templates, making them distinct and Python-specific. Enhancements - Refactored TemplateEngine to use InFileLogicParser instead of Jinja2, simplifying rendering logic. - Updated CLI utility to call create_pyproject for pyproject.toml generation. - Modified template discovery to scan only files ending in -tpl. - Adjusted file generation paths for Django app components and configuration files. Bug Fixes - Resolved template path resolution issues arising from the new suffix convention.
…er syntax New Features - Adopt double-bracket placeholders (`[[ var ]]`) and rename templates to `.py-tpl`/.`md-tpl` extensions. - Introduce new `runtime_txt-tpl` template. Enhancements - Update `api_readme`, `models`, `apps`, `routes`, `pyproject`, `readme`, and `requirements` templates with new syntax and naming. - Align placeholder naming with a unified convention. Bug Fixes - None.
…tartapp with custom app_module support This change introduces a helper to replace app entries in USER_DEFINED_APPS and makes the startapp command more flexible by allowing callers to specify the app module name. New Features: - Add replace_app_in_user_defined_apps utility function in djinit/utils/common.py - Introduce app_config_name context and accept app_module argument in DjangoHelper.startapp() Enhancements: - Preserve indentation when replacing entries - Allow custom app module specification instead of defaulting to app_name Bug Fixes: (none)
…e placeholder in AppConfig template Allows the generated AppConfig class to use a custom name derived from `app_config_name`, supporting optional `app_module` specification. New Features - Replace `app_name|title` placeholder with `app_config_name` for flexible config naming. - Add conditional block that sets `name` to `app_module` when provided, otherwise falls back to `app_name`. Enhancements - Maintain backward compatibility by defaulting to the original `app_name` behavior. - Improve template flexibility for future naming conventions. Bug Fixes - None.
…ndling - New Features - Detect and process nested project structures, generating correct module paths for AppConfig. - Automatically upgrade legacy app configurations from simple module paths to full AppConfig paths. - Enhancements - Insert full AppConfig paths into USER_DEFINED_APPS, improving template rendering for all settings files. - Provide clearer success and upgrade messages to users. - Bug Fixes - Avoid duplicate app entries and handle missing USER_DEFINED_APPS sections without crashing. - Ensure proper __init__.py creation in nested directories.
This update aligns generated projects with Django 6.0.1, providing access to the latest framework improvements and security patches.
…te engine Add foundational class hierarchy and refactor the template engine to use inheritance and common utilities, enhancing extensibility and code organization. - New Feature: Added BaseObject, BaseService, BaseCommand, and BaseUtils classes in djinit/core/base.py providing common interfaces. - Enhancement: Refactored TemplateEngine to inherit BaseService and utilize BaseUtils for logic parsing. - Enhancement: Updated InFileLogicParser to enforce proper stack handling and simplified conditional block processing. - Enhancement: Consolidated utility functions via CommonUtils in generator and ProjectManager, streamlining app configuration upgrades.
…cret key generation New Features - Added `app.py` command to scaffold Django apps with name validation and post‑creation instructions. - Added `secret.py` command to generate configurable secret keys and display usage guidance. Enhancements - Refactored command dispatch in `handler.py` to delegate to specialized command classes, removing duplicated logic. - Improved modularity and maintainability of command implementation.
…package_name - Refactor imports to use CommonUtils for resolving package names - Update calls in `InputCollector` and `get_user_input` to use `CommonUtils.get_package_name` - No functional change; improve code consistency and future extensibility
… class - Enhancements: - Moved file and directory creation helpers into CommonUtils class - Updated all call sites to use CommonUtils methods - Removed unused standalone utility functions and imports - Preserved existing behavior without functional changes
…nd environment configuration files Added conditional comment handling for database settings in production template, introduced DATABASE_URL generation in env_sample, and corrected readme structure rendering. New Features - Added conditional comment handling for `use_database_url` and `database_type` in production settings. - Added `DATABASE_URL` template logic for MySQL and PostgreSQL in env_sample. - Updated `readme.md` template to properly render unified_structure sections. Enhancements - Ensured comment syntax consistency across all template files. - Streamlined placeholder usage for clearer project scaffolding. Bug Fixes - Removed stray formatting characters from comment markers.
…ints New Features - Add Typer dependency. Enhancements - Move packages to src/ layout and update build configuration. - Change console scripts to use djinit.cli:app. - Exclude django-new from ruff checks. - Raise minimum Python version to >=3.10. Bug Fixes - none
These files (app.py, handler.py, secret.py) were no longer referenced by the active CLI flow and their removal eliminates dead code and import side‑effects. New Features - Enhancements - Streamlined command dispatch by dropping redundant handlers. - Reduced module surface area, improving maintainability. Bug Fixes - Fixed import‑induced crashes when the CLI starts without these optional sub‑commands.
The deletion of djinit's internal modules (cli, utils, services) eliminates obsolete code and prepares the repository for a streamlined Django project initialization approach. - New Features: - Enhancements: - Bug Fixes:
Introduce command-line interface and supporting modules for project initialization. - New Features: - Add `cli.py` with Typer commands `secret` and `app` - Implement custom exception hierarchy in `utils/exceptions.py` - Provide secret key generation utilities in `utils/secretkey.py` - Add name validation logic in `utils/validators.py` - Initialize package with empty `__init__.py` - Enhancements: - Update `pyproject.toml` to include new modules and console script entry points - Bug Fixes: - (none)
Remove legacy template placeholders that are no longer used in the project scaffold. - New Features: - Enhancements: Removed unused template files - Bug Fixes:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Its overhaul of project, removed jinja2 from dependencies, easy to write template i guess
Linked Issues
Additional context