19 Commits
Author SHA1 Message Date
sankalp fe9eec70d5 chore(root): bump version to 0.3.6
Release 0.3.6 with updated version number.
2026-06-25 14:47:52 +05:45
sankalp ad09fa0b79 refactor(src/djinit/templates/project): adjust env_path to parent instead of parent.parent
Simplify path resolution and avoid unnecessary filesystem traversal.
2026-06-25 12:26:01 +05:45
sankalp 5984961878 fix(src/djinit/templates/config/settings): fix .env path resolution
Prevent loading .env from wrong directory when project depth varies.
2026-06-25 12:25:44 +05:45
sankalp 5b755b789c feat(src/djinit/utils): add use_tailwind flag to project metadata
Include use_tailwind setting in generated context
2026-06-25 12:16:33 +05:45
sankalp 382d2a0f56 feat(src/djinit/templates/project): load .env and use env for settings module
Replace hard‑coded settings module with environment variable and load .env configuration for smoother local development.
2026-06-25 12:16:09 +05:45
sankalp c38d4b3832 feat(src/djinit/templates/config): add tailwind live‑reload support
Prevents missing media serving and enables dev tailwind reload
2026-06-25 12:15:52 +05:45
sankalp 3200c9f9b2 feat(src/djinit/creators): add use_tailwind context for Tailwind‑enabled scaffolding
Enable conditional Tailwind inclusion in generated files based on metadata.
2026-06-25 12:15:33 +05:45
sankalp fafe29c2cb Merge branch 'main' of github.com:S4NKALP/djinit 2026-06-24 00:45:04 +05:45
sankalp 9e3f5ead8f chore(root): update project metadata and lock file
Updated version to 0.3.5, refined description, and refreshed uv.lock with new dependency list.
2026-06-24 00:42:25 +05:45
sankalp 260d41b10d feat(src/djinit/templates/config/settings): resolve env_path for settings base
Resolve env_path to correctly load .env file from project root.
2026-06-24 00:42:08 +05:45
sankalp 2d7d712ecf feat(src/djinit/templates/config): add pathlib import and explicit .env path handling
Prevents issues with mischaracterized .env locations and ensures deterministic environment loading.
2026-06-24 00:41:51 +05:45
dependabot[bot] 3ffd85d2ca chore(deps): bump ruff from 0.15.17 to 0.15.18 (#55)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.17 to 0.15.18.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.17...0.15.18)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 02:24:23 +00:00
dependabot[bot] 8c1195880d chore(deps): bump actions/checkout from 6 to 7 (#54)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 02:24:04 +00:00
sankalp c1262d02e9 Merge branch 'main' of github.com:S4NKALP/djinit 2026-06-16 15:44:10 +05:45
sankalp 63989b7f67 chore(.github/workflows): switch dependabot auto-merge target to squash
Update auto-merge configuration to use squash strategy instead of minor for cleaner merge commits.
2026-06-16 15:43:48 +05:45
sankalp b3b0c660e6 Merge pull request #53 from S4NKALP/dependabot/pip/main/ruff-0.15.17
chore(deps): bump ruff from 0.15.16 to 0.15.17
2026-06-15 08:15:14 +05:45
dependabot[bot] 3de5d577a1 chore(deps): bump ruff from 0.15.16 to 0.15.17
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.16 to 0.15.17.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.16...0.15.17)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-15 02:24:15 +00:00
sankalp e5f93e829b Merge pull request #52 from S4NKALP/dependabot/pip/main/ruff-0.15.16
chore(deps): bump ruff from 0.15.14 to 0.15.16
2026-06-08 11:12:07 +05:45
dependabot[bot] ce5cda9330 chore(deps): bump ruff from 0.15.14 to 0.15.16
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.14 to 0.15.16.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.14...0.15.16)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 05:21:46 +00:00
16 changed files with 55 additions and 16 deletions

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
+1 -1
View File
@@ -19,4 +19,4 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
use-github-auto-merge: true
target: minor
target: squash
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
+1 -1
View File
@@ -7,7 +7,7 @@ packages = ["src/djinit"]
[project]
name = "djinitx"
version = "0.3.5"
version = "0.3.6"
description = "A CLI tool to setup Django project"
readme = "README.md"
requires-python = ">=3.10"
+1 -1
View File
@@ -1,5 +1,5 @@
questionary==2.1.1
rich==15.0.0
# dev
ruff==0.15.14
ruff==0.15.18
pre-commit==4.6.0
+1 -1
View File
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name="djinitx",
version="0.3.5",
version="0.3.6",
description="A CLI tool to setup Django projects",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
+9 -1
View File
@@ -122,6 +122,7 @@ class FileCreator(BaseService):
"project_name": self.project_name,
"api_module": api_module,
"include_api": True,
"use_tailwind": self.metadata.get("use_tailwind", False),
}
if comment_out_api:
urls_context["comment_out_api_url"] = True
@@ -247,6 +248,7 @@ class FileCreator(BaseService):
"app_names": effective_app_modules,
"include_apps": True,
"include_api": True,
"use_tailwind": self.metadata.get("use_tailwind", False),
}
self._render_and_create_file(
"urls.py",
@@ -308,7 +310,13 @@ class FileCreator(BaseService):
CommonUtils.create_file_from_template(
project_urls_path,
"config/urls.py-tpl",
{"url_type": "project", "project_name": self.project_name, "api_module": "api", "include_api": True},
{
"url_type": "project",
"project_name": self.project_name,
"api_module": "api",
"include_api": True,
"use_tailwind": self.metadata.get("use_tailwind", False),
},
"Updated project urls.py to include API routes",
should_format=True,
)
+3 -1
View File
@@ -1,11 +1,13 @@
"""generated with djinit"""
import os
from pathlib import Path
import environ
from django.core.asgi import get_asgi_application
env_path = Path(__file__).resolve().parent.parent / ".env"
env = environ.Env()
environ.Env.read_env()
environ.Env.read_env(env_path)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="[[ project_name ]].settings.production"))
application = get_asgi_application()
@@ -9,8 +9,9 @@ from pathlib import Path
import environ
env_path = Path(__file__).resolve().parent.parent.parent / ".env"
env = environ.Env()
environ.Env.read_env()
environ.Env.read_env(env_path)
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent.parent
+19 -2
View File
@@ -2,12 +2,13 @@
"""generated with djinit"""
from django.contrib import admin
from django.urls import path
from django.urls import path, re_path
from django.conf import settings
from django.views.static import serve
# @IF include_api or include_apps
from django.urls import include
# @ENDIF
# @IF include_api
from django.conf import settings
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework_simplejwt.views import (
@@ -54,6 +55,22 @@ if settings.DEBUG:
path("schema/", schema_view.with_ui("redoc", cache_timeout=0)),
]
# @ENDIF
# @IF use_tailwind
# django-browser-reload for tailwind live reload (dev only)
if settings.DEBUG:
urlpatterns += [
path("__reload__/", include("django_browser_reload.urls")),
]
# @ENDIF
urlpatterns += [
re_path(
r"^media/(?P<path>.*)$",
serve,
{"document_root": settings.MEDIA_ROOT},
),
]
# @ENDIF
# @IF url_type == 'api_root'
from django.urls import include, path
+3 -1
View File
@@ -1,11 +1,13 @@
"""generated with djinit"""
import os
from pathlib import Path
import environ
from django.core.wsgi import get_wsgi_application
env_path = Path(__file__).resolve().parent.parent / ".env"
env = environ.Env()
environ.Env.read_env()
environ.Env.read_env(env_path)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE", default="[[ project_name ]].settings.production"))
+9 -1
View File
@@ -5,13 +5,21 @@
"""Django's command-line utility for administrative tasks."""
import os
import sys
from pathlib import Path
import environ
env_path = Path(__file__).resolve().parent / ".env"
env = environ.Env()
environ.Env.read_env(env_path)
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", os.getenv("DJANGO_SETTINGS_MODULE", "[[ project_name ]].settings.production"))
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
env("DJANGO_SETTINGS_MODULE", default="[[ project_name ]].settings.production"),
)
try:
from django.core.management import execute_from_command_line
+1
View File
@@ -65,6 +65,7 @@ class DjangoHelper:
"url_type": "project",
"project_name": project_name,
"django_version": DjangoHelper.DJANGO_VERSION,
"use_tailwind": metadata.get("use_tailwind", False),
}
project_files = [
("urls.py", "config/urls.py-tpl", urls_context),
Generated
+1 -1
View File
@@ -43,7 +43,7 @@ wheels = [
[[package]]
name = "djinitx"
version = "0.3.4"
version = "0.3.6"
source = { editable = "." }
dependencies = [
{ name = "questionary" },