17 Commits
Author SHA1 Message Date
sankalp d6fa789804 chore(root): bump versioin to 0.3.7 2026-09-11 14:32:15 +05:45
sankalp 8b48a9b9bb feat(templates): upgrade to Django 6.1 and MAILERS
Require django>=6.1 in pyproject, bump ruff/pytest/pytest-django,
point docs at 6.1, drop removed SECURE_BROWSER_XSS_FILTER and
STATICFILES_STORAGE settings. Replace deprecated EMAIL_* settings
with the Django 6.1 MAILERS dict.
2026-09-10 22:33:08 +05:45
sankalp 9793da4dbf refactor(templates/project): simplify manage.py env loading
Load .env once at top via BASE_DIR, drop duplicate environ setup in __main__.
2026-09-10 22:12:46 +05:45
sankalp 9b6edfec0e fix(templates/project): use project_name in pyproject.toml
Package name, ruff known-first-party, and settings per-file-ignores
now use project_name. package_name/module_name resolved to backend or
config/core, producing wrong import resolution and settings paths.
2026-09-10 22:12:45 +05:45
dependabot[bot] dfcd598da3 chore(deps): bump ruff from 0.16.5 to 0.16.6 (#67)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.5 to 0.16.6.
- [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.16.5...0.16.6)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.6
  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-09-07 02:25:22 +00:00
dependabot[bot] d64ca9ddb2 chore(deps): bump ruff from 0.16.4 to 0.16.5 (#66)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.4 to 0.16.5.
- [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.16.4...0.16.5)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.5
  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-08-31 02:25:43 +00:00
dependabot[bot] 3e6cb2f055 chore(deps): bump ruff from 0.16.3 to 0.16.4 (#65)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.3 to 0.16.4.
- [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.16.3...0.16.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.4
  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-08-24 02:24:37 +00:00
dependabot[bot] 5ce5ebbb09 chore(deps): bump ruff from 0.16.1 to 0.16.3 (#64)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.1 to 0.16.3.
- [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.16.1...0.16.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.3
  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-08-17 02:26:54 +00:00
dependabot[bot] ca79f1968e chore(deps): bump pre-commit from 4.6.1 to 4.6.2 (#63)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.6.1...v4.6.2)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.6.2
  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-08-17 02:24:31 +00:00
dependabot[bot] ca077e380c chore(deps): bump ruff from 0.16.0 to 0.16.1 (#62)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.16.0 to 0.16.1.
- [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.16.0...0.16.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.1
  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-08-03 02:24:55 +00:00
dependabot[bot] 44299ed8a9 chore(deps): bump pre-commit from 4.6.0 to 4.6.1 (#61)
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.6.0...v4.6.1)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.6.1
  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-07-27 02:27:07 +00:00
dependabot[bot] 916d97ffdf chore(deps): bump ruff from 0.15.22 to 0.16.0 (#60)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.22 to 0.16.0.
- [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.22...0.16.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 02:24:41 +00:00
dependabot[bot] 66927b988a chore(deps): bump actions/setup-python from 6 to 7 (#59)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-python
  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-07-27 02:24:16 +00:00
dependabot[bot] df68383b44 chore(deps): bump ruff from 0.15.21 to 0.15.22 (#58)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.21 to 0.15.22.
- [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.21...0.15.22)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.22
  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-07-20 03:08:33 +00:00
dependabot[bot] d3066a7ceb chore(deps): bump ruff from 0.15.20 to 0.15.21 (#57)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.20 to 0.15.21.
- [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.20...0.15.21)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.21
  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-07-13 02:24:49 +00:00
sankalp 72e6b0df0f feat: remove AGENTS.md from .gitignore 2026-07-08 16:03:43 +05:45
dependabot[bot] 7b8d6f3342 chore(deps): bump ruff from 0.15.18 to 0.15.20 (#56)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.18 to 0.15.20.
- [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.18...0.15.20)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.20
  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-29 02:24:30 +00:00
13 changed files with 50 additions and 41 deletions

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.13"
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: 'pip'
-2
View File
@@ -1,8 +1,6 @@
#--------------------------------------------------#
# The following was generated by djinit: #
#--------------------------------------------------#
AGENTS.md
# Python
*.py[cod]
*$py.class
+1 -1
View File
@@ -7,7 +7,7 @@ packages = ["src/djinit"]
[project]
name = "djinitx"
version = "0.3.6"
version = "0.3.7"
description = "A CLI tool to setup Django project"
readme = "README.md"
requires-python = ">=3.10"
+2 -2
View File
@@ -1,5 +1,5 @@
questionary==2.1.1
rich==15.0.0
# dev
ruff==0.15.18
pre-commit==4.6.0
ruff==0.16.6
pre-commit==4.6.2
+1 -1
View File
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name="djinitx",
version="0.3.6",
version="0.3.7",
description="A CLI tool to setup Django projects",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
@@ -17,7 +17,7 @@ environ.Env.read_env(env_path)
BASE_DIR = Path(__file__).resolve().parent.parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/6.1/howto/deployment/checklist/
# Application definition
@@ -83,7 +83,7 @@ WSGI_APPLICATION = "[[ project_name ]].wsgi.application"
# Password validation
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/6.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
@@ -102,7 +102,7 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/5.2/topics/i18n/
# https://docs.djangoproject.com/en/6.1/topics/i18n/
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
@@ -176,7 +176,6 @@ CORS_ALLOW_HEADERS = [
CORS_PREFLIGHT_MAX_AGE = 86400 # 24 hours
# Security Settings
SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True
X_FRAME_OPTIONS = "DENY"
@@ -10,7 +10,7 @@ DEBUG = True
ALLOWED_HOSTS = ["*"]
# Database
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
# https://docs.djangoproject.com/en/6.1/ref/settings/#databases
DATABASES = {
"default": {
@@ -30,8 +30,12 @@ DATABASES = {
}
}
# Email backend for development
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
# Email settings for development
MAILERS = {
"default": {
"BACKEND": "django.core.mail.backends.console.EmailBackend",
},
}
# CORS settings for development
# Allow all origins in development (convenient but not secure)
@@ -43,14 +43,20 @@ CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_PRIVATE_NETWORK = False
# Email settings
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = env('EMAIL_HOST', default="smtp.gmail.com")
EMAIL_PORT = env.int('EMAIL_PORT', default=587)
EMAIL_USE_TLS = env.bool('EMAIL_USE_TLS', default=True)
EMAIL_HOST_USER = env('EMAIL_HOST_USER', default="")
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', default="")
DEFAULT_FROM_EMAIL = env('EMAIL_HOST_USER', default="")
SERVER_EMAIL = env('EMAIL_HOST_USER', default="")
MAILERS = {
'default': {
'BACKEND': 'django.core.mail.backends.smtp.EmailBackend',
'OPTIONS': {
'host': env('EMAIL_HOST', default='smtp.gmail.com'),
'port': env.int('EMAIL_PORT', default=587),
'use_tls': env.bool('EMAIL_USE_TLS', default=True),
'username': env('EMAIL_HOST_USER', default=''),
'password': env('EMAIL_HOST_PASSWORD', default=''),
},
},
}
DEFAULT_FROM_EMAIL = env('EMAIL_HOST_USER', default='')
SERVER_EMAIL = env('EMAIL_HOST_USER', default='')
# Security settings for production
SECURE_SSL_REDIRECT = True
@@ -63,9 +69,6 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
# Static files
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# @IF use_tailwind
## Tailwind
TAILWIND_CLI_VERSION = "4.1.3" # Pin version
+9 -7
View File
@@ -3,22 +3,27 @@
"""generated with djinit"""
"""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"
# Load environment variables from .env
BASE_DIR = Path(__file__).resolve().parent
env = environ.Env()
environ.Env.read_env(env_path)
env.read_env(BASE_DIR / ".env")
def main():
"""Run administrative tasks."""
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
env("DJANGO_SETTINGS_MODULE", default="[[ project_name ]].settings.production"),
env(
"DJANGO_SETTINGS_MODULE",
default="[[ project_name ]].settings.production",
),
)
try:
@@ -29,12 +34,9 @@ def main():
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == "__main__":
env = environ.Env()
# Read .env file, if it exists
environ.Env.read_env()
main()
@@ -1,12 +1,12 @@
[project]
name = "[[ package_name ]]"
name = "[[ project_name ]]"
version = "0.1.0"
description = ""
readme = "README.md"
requires-python = ">=3.13"
license = { text = "MIT" }
dependencies = [
"django",
"django>=6.1,<7.0",
"django-environ",
"django-jazzmin",
"djangorestframework",
@@ -37,9 +37,9 @@ dependencies = [
[dependency-groups]
dev = [
"ruff>=0.14.2",
"pytest>=8.0.0",
"pytest-django>=4.9.0",
"ruff>=0.16.6",
"pytest>=9.1.1",
"pytest-django>=4.14.0",
]
[tool.ruff]
@@ -62,4 +62,7 @@ ignore = [
]
[tool.ruff.lint.isort]
known-first-party = ["[[ module_name ]]"]
known-first-party = ["[[ project_name ]]"]
[tool.ruff.lint.per-file-ignores]
"[[ project_name ]]/settings/*.py" = ["F403", "F405"]
Generated
+1 -1
View File
@@ -43,7 +43,7 @@ wheels = [
[[package]]
name = "djinitx"
version = "0.3.6"
version = "0.3.7"
source = { editable = "." }
dependencies = [
{ name = "questionary" },