Commit Graph
100 Commits
Author SHA1 Message Date
sankalp 5f80a574b6 chore(root): tidy README and clarify project structure wording
Minor formatting tweaks and clarified wording.

New Features
-
Enhancements
- Updated badge links and wording for Django and Python versions.
- Adjusted bullet punctuation and wording for consistency.
- Clarified installation comment formatting.
Bug Fixes
-
2026-05-28 10:36:23 +05:45
sankalp 7bac6b176e fix(src/djinit/creators): add project_name to urls_context and urls.py template context
- Ensure project_name is passed when generating urls.py, preventing TemplateError.
- Improves template rendering consistency for API route inclusion.
2026-05-28 10:34:05 +05:45
sankalp e8176a1ff5 chore(root): complete testingframework setup
Enhancements:
- Marked testing framework setup (pytest, coverage) as done in TODO.
2026-05-28 10:34:03 +05:45
sankalp 3cfeb99946 feat(src/djinit/templates/project):add pytest and pytest-django to dev dependencies 2026-05-28 10:20:44 +05:45
sankalp 10ff50d841 feat(src/djinit/templates/config/settings): add dj_database_url import and noqa directives
Add support for optional database URL configuration and silence import-related flake8 warnings.

- New Features: Introduce conditional import of `dj_database_url` in production settings.
- Enhancements: Suppress flake8 warnings for base imports using `# noqa: F401, F403`.
- Bug Fixes: None.
2026-05-28 10:18:41 +05:45
sankalp b09a77592d feat(src/djinit/templates/project):add dev dependency group for ruff and update ruff config 2026-05-28 10:18:34 +05:45
sankalp bf97ba0dec feat(root): Introduce djinitx CLI and enrich README with full project scaffolding and usage guide
Add a concise overview of the new content and purpose.

- New Features
  - Interactive project scaffolding wizard (`djinit setup` / `dj setup`) offering multiple layouts, database options, and frontend tooling.
  - Command‑line secret generation (`djinit secret`) with customizable count and length.
  - Detailed usage examples, command shortcuts, and supported CI/CD configurations.
  - Updated installation instructions using pipx, uv, and pip.
- Enhancements
  - Switched CI configuration to GitHub Actions.
  - Added comprehensive API endpoint table, settings summary, and package reference.
  - Included installation badges and code snippets for quick start.
- Bug Fixes
  - (none reported)
2026-05-28 10:18:30 +05:45
sankalp 501c1d1159 docs(root): Update README license line to include markdown link to author's website 2026-05-28 10:11:20 +05:45
sankalp da6b60ee24 feat(src/djinit/creators): incorporate Tailwind and Vite metadata into .gitignore and justfile generation
- New Features
  - Custom .gitignore generation using use_tailwind and use_vite flags from project metadata
  - Justfile now includes Vite configuration flag context
- Enhancements
  - Dynamic template rendering with project‑specific context for better project setup reflectivity
- Bug Fixes
  - (none)
2026-05-28 10:08:26 +05:45
sankalp c14abdb03e feat(src/djinit/utils): introduce use_vite flag handling
Add `use_vite` flag to metadata processing and include it in the development context dictionary.

- New Feature: expose Vite integration flag
- Enhancement: extend dev_context with use_vite value
- No bug fixes
2026-05-28 10:08:22 +05:45
sankalp 7a9563957d feat(src/djinit/templates/project): add Vite support and update dependency handling
Introduce Vite‑based frontend workflow and adjust related templates and CI configurations. Switch drf‑spectacular to drf‑yasg, add conditional Node.js setup, and update ignored files accordingly.

- New Features
  - Conditional Vite integration via `use_vite` flag
  - npm install and build steps added to Dockerfile and CI pipelines
  - Vite dev server command added to `justfile` with `dev-full` target
  - Updated CI scripts (GitHub Actions, GitLab CI) to run Vite build when enabled
  - Dependency change from `drf-spectacular` to `drf-yasg` in `pyproject.toml`

- Enhancements
  - Modify `.gitignore` to exclude `node_modules` only when using frontend tools
  - Update Dockerfile to conditionally install Node.js packages for Vite
  - Adjust GitHub Actions and GitLab CI templates to include Node setup steps

- Bug Fixes
  - Replace `drf-spectacular` with `drf-yasg` to align with current API documentation practices
2026-05-28 10:08:19 +05:45
sankalp 197e35948f feat(root): add optional frontendtooling and restructure Django app scaffolding
New Features
- Introduce selectable frontend tooling (Tailwind CSS, HTMX, Vite) via optional scaffolding
- Add `just vite` and `just dev-full` commands for Vite integration
- Replace `drf-spectacular` with `drf-yasg` for Swagger documentation
- Update API endpoint table to list ReDoc instead of Swagger UI

Enhancements
- Reorder Django Apps selection to reflect standard structure only
- Bump project version to 0.3.4 and update roadmap in TODO.md

Bug Fixes
- Remove placeholder “Fix bugs” entry from TODO.md
2026-05-28 10:08:09 +05:45
sankalp 4025f6acf2 feat(src/djinit/templates/config): replace drf_spectacular with drf_yasg for API schema generation
- New Features
  - Switched to drf_yasg and updated schema configuration.
- Enhancements
  - Updated DEFAULT_SCHEMA_CLASS to rest_framework.schemas.coreapi.AutoSchema.
  - Refactored URL patterns to use drf_yasg schema views.
- Bug Fixes
  - No bug fixes included.
2026-05-28 10:07:58 +05:45
sankalp 2a5480ff05 feat(src/djinit/templates): AddVite‑based asset pipeline support
- New Features
  - Insert manifest_path and static_url_prefix into base settings for Vite output
  - Enable/disable dev mode via DJANGO_VITE["default"]["dev_mode"] in development and production templates
  - Add django‑vite dependency conditionally when use_vite is set in pyproject.toml and requirements
  - Create new vite.config.ts template with React, Tailwind, dev server proxy, and asset resolution
- Enhancements
  - Align Tailwind and Django settings to respect Vite mode
  - Update dependency templates to reflect Vite usage
- Bug Fixes
  - (none)
2026-05-28 09:55:41 +05:45
sankalp 5084b351a5 feat(src/djinit/ui): Introduce Vite integration options
Add Vite scaffolding support to allow users to initialize projects with Vite.

- New Features
  - Added `use_vite` flag to `StructureOptions`.
  - Added `get_vite_choice()` method to `InputCollector` with confirmation dialog.
  - Extended metadata dictionary to include `use_vite`.
  - Updated project generation to propagate Vite configuration.
- Enhancements
  - Integrated Vite confirmation into the CLI prompt flow.
  - Updated project metadata creation to include Vite settings.
2026-05-28 09:55:37 +05:45
sankalp a8af4674a0 feat(src/djinit/core): add use_vite flag to ProjectMetadata
Add a boolean `use_vite` to `ProjectMetadata` to control Vite integration and include it in the serialized project metadata.

- New Features: Introduce `use_vite` configuration option.
- Enhancements: Expose `use_vite` in metadata output.
2026-05-28 09:55:30 +05:45
sankalp 86906070aa chore(root): complete Docker Support and Frontend Integration
Marked Docker Support and Frontend Integration tasks as completed.
2026-05-28 09:55:26 +05:45
sankalp d96db6b313 feat(src/djinit/creators): add Vite support for frontend bundling
Introduce Vite configuration generation and propagate the use_vite flag across templates to enable modern frontend tooling.

New Features- Add `create_vite_config` method to generate `vite.config.ts`.
- Propagate `use_vite` metadata to all relevant context dictionaries.
- Include Vite usage in Dockerfile, requirements.txt, pyproject.toml, and CI pipelines.

Enhancements
- Update context preparation to embed Vite flag alongside Tailwind and HTMX.
- Refine template documentation to mention Tailwind, HTMX, and Vite integration.

Bug Fixes
- None.
2026-05-28 09:55:22 +05:45
sankalp 0472a6f00b feat(src/djinit/creators): add use_tailwind and use_htmx metadata to pyproject.toml and CI templates
The new metadata enables optional Tailwind CSS and HTMX support in generated Django projects, expanding customization capabilities.

New Features:
- Expose `use_tailwind` and `use_htmx` flags in the pyproject.toml template.
- Inject these flags into GitHub Actions and GitLab CI configuration templates.

Enhancements:
- Centralized handling of Tailwind and HTMX configuration flags across all generated files.
2026-05-28 09:33:05 +05:45
sankalp 29306ef865 chore(root): bump uv.lock lockfile
The uv.lock file has been updated to reflect the latest dependency versions, ensuring consistent and reproducible builds.

Enhancements
- Upgraded key dependencies (cfgv, click, colorama, distlib, djinitx) to newer releases.
- Improved build reproducibility and security posture.

Bug Fixes
- None
2026-05-28 09:33:01 +05:45
sankalp 90da64612f chore(src/djinit/templates/project/ci): streamline CI jobs and improve caching
The CI templates were refactored to simplify configuration, remove redundant services, and enable better cache reuse while maintaining compatibility across Python versions.

- New Features
  - Consolidated caching logic with `cache-suffix` per Python version.
  - Integrated security check directly into the main pipeline.

- Enhancements
  - Reduced matrix size to only Python 3.13.
  - Replaced manual PostgreSQL setup with Django checks using `DJANGO_SETTINGS_MODULE` and `SECRET_KEY`.
  - Merged duplicate test and security steps across CI platforms.

- Bug Fixes
  - Fixed missing `python-version` entries that caused undefined matrix behavior.
  - Resolved duplicate environment variable definitions in GitLab CI.
2026-05-28 09:32:57 +05:45
sankalp 4609ff6eb1 feat(src/djinit/templates/project): add optional Tailwind, HTMX, and database URL dependenciesAdd conditional dependencies for Tailwind, HTMX, and database URL in pyproject.toml template; update dockerignore to include staticfiles; fix Dockerfile CMD newline handling.
Details:
- New Features: Conditional Tailwind, HTMX, and database URL dependencies
- Enhancements: Updated dockerignore to include staticfiles
- Bug Fixes: Fixed Dockerfile CMD newline handling
2026-05-28 09:32:52 +05:45
sankalp b6e1d39132 feat(src/djinit/templates/project): add Dockerfile and dockerignore templates
Introduce Dockerfile and dockerignore templates to scaffold Docker‑ready Django projects, providing conditional system‑level dependencies for databases and optional Tailwind support, and a comprehensive ignore list for generated projects.

- New Features
  - Dockerfile template with conditional apt packages for MySQL or PostgreSQL, and optional Tailwind installation.
  - dockerignore template covering Python bytecode, virtual environments, OS artifacts, Django static/media files, and common VCS files.

- Enhancements
  - Expand project scaffolding to include ready‑to‑use container configuration files.
2026-05-28 09:22:33 +05:45
sankalp 05c329b595 feat(src/djinit/creators): add Dockerfile and .dockerignore generation for new projects
Introduce automatic creation of Dockerfile and .dockerignore during project scaffolding, enabling container‑ready setups out of the box.

* New Features
  - `create_dockerfile` method renders Dockerfile with configurable context (module name, database type, Tailwind usage).
  - `create_dockerignore` method generates a .dockerignore file to exclude unnecessary files from containers.
* Enhancements
  - Added both methods to the setup pipeline in `SetupCreator` so they are executed automatically.
  - Context values are derived from project metadata, allowing customization per project.
* Bug Fixes  - None
2026-05-28 09:22:29 +05:45
sankalp abb5bd2aa1 Merge pull request #50 from S4NKALP/dependabot/pip/main/ruff-0.15.14
chore(deps): bump ruff from 0.15.13 to 0.15.14
2026-05-25 20:11:06 +05:45
sankalp 3d86539db6 fix(src/djinit/templates/project): update FRONTEND_URL default to include https:// for www subdomain
Enhancements:
- Updated FRONTEND_URL default from `https://frontend.your-domain.com,www.frontend.your-domain.com` to `https://frontend.your-domain.com,https://www.frontend.your-domain.com` to ensure consistent HTTPS usage.
2026-05-18 18:16:28 +05:45
sankalp 4e2869a8f6 Merge pull request #49 from S4NKALP/dependabot/pip/main/ruff-0.15.13
chore(deps): bump ruff from 0.15.12 to 0.15.13
2026-05-18 10:44:40 +05:45
sankalp 175592f82a Merge pull request #47 from S4NKALP/dependabot/pip/main/pre-commit-4.6.0 2026-05-04 09:53:37 +05:45
sankalp fde8c0b5e2 Merge pull request #46 from S4NKALP/dependabot/pip/main/ruff-0.15.12 2026-05-04 09:52:12 +05:45
sankalp 2b1f562649 bump to 0.3.4 2026-04-22 19:27:55 +05:45
sankalp 0ce6342ca7 Merge branch 'main' of github.com:S4NKALP/djinit 2026-04-22 19:22:43 +05:45
sankalp 0c7b007729 feat(src/djinit/templates/project): update frontend URL to HTTPS and add www subdomain
Enhancements
- Replace http://frontend.your-domain.com with https://frontend.your-domain.com,www.frontend.your-domain.com in env_sample-tpl to reflect modern HTTPS usage.
2026-04-22 19:22:10 +05:45
sankalp eaddc4576d Merge pull request #45 from S4NKALP/dev 2026-04-20 14:54:57 +05:45
sankalp d741249644 feat(templates): add Tailwind and HTMX integration and fix static/media URLs
Introduce Tailwind and HTMX support with conditional placeholders and correct static/media URL prefixes.

- New Features
  - Add django_tailwind_cli and django_htmx when enabled
  - Add HtmxMiddleware to middleware stack
  - Pin Tailwind CLI version and set distribution CSS path in production
  - Configure Tailwind theme and daisyui settings
- Enhancements
  - Prefix STATIC_URL and MEDIA_URL with '/' for proper URL handling
  - Update requirements templates with new optional dependencies
  - Expand pyproject.toml metadata and dependency groups
- Bug Fixes
  - Fix missing leading slash in STATIC_URL and MEDIA_URL
  - Pin Tailwind CLI version to avoid unexpected upgrades
2026-04-20 14:44:10 +05:45
sankalp dee852efb9 feat(src/djinit/core): add Tailwind and HTMX configuration flags to ProjectMetadata
**New Features**
- Add `use_tailwind` and `use_htmx` boolean fields to `ProjectMetadata` with defaults set to `False`.
- Update `ProjectMetadata.__init__` mapping to include these new attributes, ensuring they are persisted in project metadata.
2026-04-20 14:44:06 +05:45
sankalp fc93a54430 feat(src/djinit/creators): add Tailwind and HTMX toggles to generated settings
Add configurable `use_tailwind` and `use_htmx` flags to the Django starter project context, allowing users to optionally include Tailwind CSS and HTMX JavaScript libraries.

- New Features:
  - Introduce `use_tailwind` and `use_htmx` metadata flags in `base_settings_context`.
  - Propagate these flags to `requirements.txt`, generated `settings.py`, and CI configuration templates.
- Enhancements:
  - Ensure the flags are consistently available across all templated files.
- Bug Fixes: None.
2026-04-20 14:44:04 +05:45
sankalp 04c911c3d9 feat(src/djinit/utils): add use_tailwind and use_htmx configuration flags
New Features:
- Add `use_tailwind` metadata option (default False) for Tailwind CSS support.
- Add `use_htmx` metadata option (default False) for HTMX support.

Enhancements:
- Extend DjangoHelper context to include the new flags in generated settings.
2026-04-20 14:43:59 +05:45
sankalp 8bb81a1a38 feat(src/djinit/ui): addTailwind CSS and HTMX selection support
- New Features:
  - Add `use_tailwind` and `use_htmx` fields to `StructureOptions` and expose confirmation prompts via `get_tailwind_choice` and `get_htmx_choice`.
  - Persist these selections in the generated metadata and pass them through the initialization flow.
- Enhancements:
  - Include `use_tailwind` and `use_htmx` values when constructing the metadata dictionary.
  - Display Tailwind CSS and HTMX choices in the final confirmation output.
- Bug Fixes: none
2026-04-20 14:43:54 +05:45
sankalp 5013c1a31a feat(src/djinit/templates/config/settings): introduce explicit storage configuration
* New Features
  * Replace the singular `STATICFILES_STORAGE` assignment with a `STORAGES` dictionary defining `default` and `staticfiles` backends.

* Enhancements
  * Add `DEFAULT_AUTO_FIELD` setting for consistency with recent Django recommendations.
  * Make storage backend definitions clearer and more extensible.

* Bug Fixes
  * None.
2026-04-20 14:28:09 +05:45
sankalp d79698cfb4 feat(src/djinit/templates/project): bump target-version to py313
Why: enable support for Python 3.13.

New Features
- Updated pyproject.toml template to target Python 3.13, allowing builds with newer interpreters.

Enhancements
- Improves compatibility with upcoming Python releases.
2026-04-20 14:28:05 +05:45
sankalp e5f77143bf feat(src/djinit/utils): add get_full_app_config_path static method to compute full AppConfig pathAdd a static method get_full_app_config_path that builds the full path to an AppConfig class, handling nested app structures and module resolution. Improves reliability of AppConfig path calculation.
- New Features
  - Added `get_full_app_config_path` method to generate full AppConfig paths.
- Enhancements
  - Centralized AppConfig path calculation logic using existing `calculate_app_module_path`.
- Bug Fixes
  - None
2026-04-20 14:27:59 +05:45
sankalp 7d91c037ca feat(src/djinit/creators): add unified URL registration and AppConfig path handling
- New Features: Automatically include app URLs in project urls.py and api/v1/urls.py; Generate full AppConfig paths using a unified utility
- Enhancements: Improved nested-app detection and path resolution across predefined, standard, single, and unified structures; Refined context transformation for base settings; Updated URL template rendering
- Bug Fixes: Fixed duplicate include‑statement handling; Corrected URL update error paths and exception safety
2026-04-20 14:27:53 +05:45
sankalp ee0b22f2ae feat(src/djinit/creators): add API v1 URL integration for predefined structures and enhance context variables
- Add conditional logic to `_add_to_api_v1_urls` when `structure_type` is `"predefined"`
- Include `module_name` in contexts for `justfile` and `Procfile` templates
- Clarify `module_name` usage in `.env.sample` generation comment
2026-04-20 14:24:38 +05:45
sankalp 4c40dd21fd fix(src/djinit/templates/project): update template placeholders and dependency references
New Features
- Replace double‑curly placeholder syntax with direct variable usage in justfile and procfile templates.

Enhancements
- Change psycopg2-binary to psycopg[binary] in pyproject.toml template.
- Update ruff.isort known‑first‑party from project_name to module_name.
- Adjust server commands to reference module_name placeholder and use variable syntax directly.

Bug Fixes- Fix placeholder expansion in dev‑server, makemigrations, install, and remove commands.
- Correct requirements generation script to handle missing pyproject.toml gracefully.
- Resolve incorrect variable substitution in gunicorn bind commands and worker count references.
2026-04-20 14:24:27 +05:45
sankalp 09fa597215 fix(ci): correct Python version and Django settings variable interpolation
- Bug Fixes:
  - Fixed Jinja syntax in GitHub Actions workflow (removed extraneous {{ }} around matrix.python-version).
  - Updated DJANGO_SETTINGS_MODULE placeholder from [[ project_name ]] to [[ module_name ]] in GitLab CI template.
2026-04-20 14:24:20 +05:45
sankalp 123141bd32 feat(src/djinit/creators): add use_database_url flag for pyproject.toml
Why: expose ability to toggle usage of DATABASE_URL in generated configuration.

New Features
- Add configurable `use_database_url` parameter to control inclusion of DATABASE_URL in generated pyproject.toml.

Enhancements
- Increase flexibility of database configuration for generated Django projects.

Bug Fixes
- (none)
2026-04-20 14:12:12 +05:45
sankalp 72fc023fd3 feat(src/djinit/templates/config/settings): add DATABASE_URL support via dj_database_url
Add conditional import of `dj_database_url` and a directive comment for `use_database_url` to enable automatic database configuration when the `use_database_url` flag is set, improving flexibility of the production settings template.

- New Features: Introduce support for reading `DATABASE_URL` to configure Django databases automatically.
- Enhancements: Conditional import improves template modularity and reduces unnecessary dependencies.
- Bug Fixes: None.
2026-04-20 14:12:07 +05:45
sankalp c4f66d607b feat(src/djinit/templates/project): update env template placeholder and add optional database URL dependency
New Features
- Add optional `dj-database-url` dependency for database URL support.

Enhancements
- Replace `{{ project_name }}` with `[[ project_name ]]` in the env template for clearer interpolation.

Bug Fixes
- None
2026-04-20 14:12:05 +05:45
sankalp 0a4aa2c39a Merge pull request #43 from S4NKALP/dependabot/pip/main/ruff-0.15.11 2026-04-20 14:06:23 +05:45
sankalp 415a7c2ea5 Merge pull request #42 from S4NKALP/dependabot/pip/main/rich-15.0.0 2026-04-13 12:04:37 +05:45
sankalp 2895635c99 Merge pull request #41 from S4NKALP/dependabot/pip/main/ruff-0.15.10 2026-04-13 12:04:26 +05:45
sankalp 65f300e774 Merge pull request #40 from S4NKALP/dependabot/pip/main/ruff-0.15.9 2026-04-08 12:21:34 +05:45
sankalp 56b2b8574d Merge pull request #39 from S4NKALP/dependabot/uv/pygments-2.20.0 2026-03-31 15:54:17 +05:45
sankalp 0ba3d0c8d1 Merge pull request #38 from S4NKALP/dependabot/pip/main/ruff-0.15.8 2026-03-30 09:34:07 +05:45
sankalp a3d3e5bdd5 Merge pull request #37 from S4NKALP/dependabot/pip/main/ruff-0.15.7 2026-03-23 14:05:13 +05:45
sankalp afac4dc36a Merge pull request #36 from S4NKALP/dependabot/pip/main/ruff-0.15.6 2026-03-16 19:53:19 +05:45
sankalp b131f48619 Merge pull request #35 from S4NKALP/dependabot/pip/main/ruff-0.15.5 2026-03-10 01:08:25 +05:45
sankalp 4a03328b33 feat(.github/workflows): enable dependabot auto‑merge for minor updates
- Switch trigger to `pull_request_target` with `opened`, `synchronize`, and `reopened` events for safer automation
- Add explicit check that the actor is `dependabot[bot]` to prevent unintended executions
- Use `GITHUB_TOKEN` instead of a dedicated secret and enable `use-github-auto-merge` for automatic merging of minor updates
2026-03-06 19:40:50 +05:45
sankalp cb139a1efc Merge pull request #34 from S4NKALP/dependabot/pip/main/ruff-0.15.4
chore(deps): bump ruff from 0.15.2 to 0.15.4
2026-03-06 19:38:21 +05:45
sankalp 9570aa7220 Merge pull request #33 from S4NKALP/dev
update ci workflow
2026-03-01 00:55:51 +05:45
sankalp 1be862368d update ci workflow 2026-03-01 00:55:06 +05:45
sankalp 6229e17f42 Merge pull request #32 from S4NKALP/dev
Dev
2026-03-01 00:51:38 +05:45
sankalp 6c56689d8c chore: Remove space after equals sign in SECRET_KEY assignment. 2026-03-01 00:51:19 +05:45
sankalp 48177d969b Merge remote-tracking branch 'origin/main' into dev 2026-03-01 00:51:08 +05:45
sankalp 992688641e update templates 2026-03-01 00:48:50 +05:45
sankalp c42e0635b8 update templates 2026-03-01 00:45:29 +05:45
sankalp 68f1b44eab fix: fixed secret key not generated 2026-03-01 00:27:47 +05:45
sankalp 4ecea0afe3 feat(djinit/templates/project): improve secret key formatting and generate requirements via uv
Remove leading space in SECRET_KEY assignment and replace uv pip compile with uv run python ... to produce requirements.txt.

New Features
- Introduce uv-driven dependency compilation in justfile.j2
- Ensure generated requirements.txt reflects project dependencies from pyproject.toml

Enhancements
- Align secret key configuration to match production standards (no extra whitespace)

Bug Fixes
- Eliminate accidental whitespace that could cause secret key validation issues
2026-02-28 23:50:26 +05:45
sankalp aefeeadf3e Merge pull request #31 from S4NKALP/dependabot/pip/main/ruff-0.15.2
chore(deps): bump ruff from 0.14.14 to 0.15.2
2026-02-28 23:48:32 +05:45
sankalp a76e7e388b Merge pull request #30 from S4NKALP/dependabot/pip/main/rich-14.3.3
chore(deps): bump rich from 14.3.1 to 14.3.3
2026-02-28 23:48:19 +05:45
sankalp e24fb36dea chore(djinit/templates): purge obsolete template components
Remove legacy template placeholders that are no longer used in the project scaffold.

- New Features:
- Enhancements: Removed unused template files
- Bug Fixes:
2026-01-31 22:23:57 +05:45
sankalp 7d76fb902c feat(src/djinit): add CLI and core utility modules
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)
2026-01-31 22:23:51 +05:45
sankalp 866ddd0105 refactor(djinit): Remove CLI and utility modules
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:
2026-01-31 22:23:46 +05:45
sankalp 7d83f41c48 refactor(djinit/commands): remove unused command modules
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.
2026-01-31 22:23:40 +05:45
sankalp a3d20860b6 refactor(root): migrate project to src layout and update CLI entry points
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
2026-01-31 22:23:35 +05:45
sankalp a293ad9771 update 2026-01-31 22:23:15 +05:45
sankalp 0cff748d5e feat(djinit/templates): Refine template placeholders for production and 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.
2026-01-31 02:48:32 +05:45
sankalp 85981115ce refactor(djinit/utils): centralize utility functions into CommonUtils 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
2026-01-31 02:48:26 +05:45
sankalp 744f65efc7 refactor(djinit/ui): use CommonUtils.get_package_name instead of get_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
2026-01-31 02:48:21 +05:45
sankalp 995d0624e4 feat(djinit/commands): add dedicated commands for app creation and secret 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.
2026-01-31 02:48:18 +05:45
sankalp e5f05681d1 feat(djinit): introduce base service abstractions and refactor template 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.
2026-01-31 02:48:13 +05:45
sankalp 64edec1cc2 feat(djinit/core): bump Django version to 6.0.1
This update aligns generated projects with Django 6.0.1, providing access to the latest framework improvements and security patches.
2026-01-31 02:17:46 +05:45
sankalp f82bf1172d feat(djinit/services): support nested apps and full AppConfig path handling
- 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.
2026-01-31 02:15:50 +05:45
sankalp cab69c2232 feat(djinit/templates/components): expose configurable app_config_name 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.
2026-01-31 02:15:44 +05:45
sankalp 41782c3df0 feat(djinit/utils): add replace_app_in_user_defined_apps and extend startapp 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)
2026-01-31 02:15:36 +05:45
sankalp 0fde5c7aa8 feat(djinit/templates): migrate templates to double-bracket placeholder 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.
2026-01-31 01:39:11 +05:45
sankalp bc23b02007 feat(djinit/core): add InFileLogicParser template rendering module
- New Features
  * Introduce InFileLogicParser with support for @IF, @ELSEIF, @ELSE, @ENDIF, @LOOP syntax
- Enhancements
  * Enable nested conditionals and iteration over iterables within templates
- Bug Fixes
  * None
2026-01-31 01:39:04 +05:45
sankalp a65e12442e feat(djinit): introduce .py-tpl template convention and modernize rendering 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.
2026-01-31 01:39:00 +05:45
sankalp 6cc5fe43e6 feat(djinit/utils): Use .py-tpl templates for generated Django files
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
2026-01-31 01:38:56 +05:45
sankalp 9d699abea3 refactor(root): drop jinja2 dependency
Enhancements
- Removed unused `jinja2` dependency from `pyproject.toml` and `requirements.txt`.
2026-01-31 01:38:50 +05:45
sankalp 3862722e2b fix formatting 2026-01-30 23:37:23 +05:45
sankalp a7b92c72cd Merge branch 'main' of github.com:S4NKALP/djinit 2026-01-30 23:31:34 +05:45
sankalp e5a49f1a89 feat(djinit/templates/config): make DJANGO_SETTINGS_MODULE configurable with project name
New Features
- Replace hardcoded `core.settings.production` with templated `{{ project_name }}.settings.production` in both ASGI and WSGI config templates, enabling per‑project settings customization.

Enhancements
- Increase template flexibility for project‑specific configuration without manual edits.

Bug Fixes
- None
2026-01-30 23:29:53 +05:45
sankalp 0cffc3926d feat(djinit/templates/project): default DJANGO_SETTINGS_MODULE to project production settings
Set the default DJANGO_SETTINGS_MODULE environment variable to point to the production settings module derived from the project name, ensuring the Django management script runs with the correct configuration when no explicit DJANGO_SETTINGS_MODULE is provided.

New Features
- Automatically default the DJANGO_SETTINGS_MODULE to `<project_name>.settings.production`, simplifying project setup.

Enhancements
- Improves the management script initialization by providing a sensible production settings fallback.

Bug Fixes
- None.
2026-01-30 23:29:47 +05:45
sankalp eedb3e3677 ci(djinit/templates/project/ci): remove legacy Python versions from CI matrix
- New Features
  - Updated CI matrix to test Python 3.12 and 3.13.
- Enhancements
  - Dropped support for Python 3.10 and 3.11.
  - Reduces CI runtime and resource consumption.
- Bug Fixes
  - No bug fixes included.
2026-01-30 23:29:39 +05:45
sankalp 37e2ecff49 fix(djinit/utils): inject project_name into manage.py template rendering
Bug Fixes
- Add `project_name` to the template context when creating `manage.py` to prevent missing‑variable errors.
2026-01-30 23:29:31 +05:45
sankalp 370215fcc2 Merge pull request #26 from S4NKALP/dependabot/uv/virtualenv-20.36.1
chore(deps): bump virtualenv from 20.35.4 to 20.36.1
2026-01-29 01:41:42 +05:45
sankalp 22839528d2 Merge pull request #23 from S4NKALP/dependabot/pip/main/rich-14.3.1
chore(deps): bump rich from 14.2.0 to 14.3.1
2026-01-29 01:40:15 +05:45
sankalp 93094cb7fe Merge pull request #24 from S4NKALP/dependabot/pip/main/ruff-0.14.14
chore(deps): bump ruff from 0.14.13 to 0.14.14
2026-01-29 01:40:04 +05:45
sankalp 665cd62f5a Merge pull request #22 from S4NKALP/dependabot/pip/main/ruff-0.14.13
chore(deps): bump ruff from 0.14.11 to 0.14.13
2026-01-19 19:56:50 +05:45