addTailwind CSS and HTMX selection support #45

Merged
S4NKALP merged 5 commits from dev into main 2026-04-20 09:09:57 +00:00
5 Commits
Author SHA1 Message Date
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