{"owner":"cookiecutter","repo":"cookiecutter-django","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# AGENTS.md\n\nThis file provides guidance to AI coding agents when working with code in this repository.\n\n## What This Project Is\n\ncookiecutter-django is a **Cookiecutter template** that generates production-ready Django projects. It is NOT a Django application itself — it's a Jinja2-templated project scaffold. The generated project lives inside `{{cookiecutter.project_slug}}/` and gets processed by Cookiecutter when users run the generator.\n\n## Commands\n\n### Install dependencies\n\n```bash\nuv sync --locked\n```\n\n### Run tests\n\n```bash\n# Full test suite (parallel, via tox)\nuv run tox run -e py\n\n# Direct pytest (parallel)\nuv run pytest -n auto tests\n\n# Single test\nuv run pytest tests/test_cookiecutter_generation.py -k \"test_name\"\n\n# Run with auto-fixable style checks enabled\nAUTOFIXABLE_STYLES=1 uv run pytest -n auto tests\n```\n\n### Linting and formatting\n\n```bash\n# Run all pre-commit hooks\nuv run pre-commit run --all-files\n\n# Ruff only\nuv run ruff check --fix\nuv run ruff format\n```\n\n### Integration tests (require Docker or PostgreSQL+Redis)\n\n```bash\n# Docker-based\nsh tests/test_docker.sh                          # defaults\nsh tests/test_docker.sh use_celery=y use_drf=y   # with options\n\n# Bare metal (needs PostgreSQL and Redis running)\nsh tests/test_bare.sh\nsh tests/test_bare.sh use_celery=y frontend_pipeline=Gulp\n```\n\n### Generate a project locally for debugging\n\n```bash\nuv run cookiecutter . --no-input --output-dir=/tmp/debug\n```\n\n## Architecture\n\n### Template Generation Flow\n\n1. User runs `cookiecutter` — prompted with options from `cookiecutter.json`\n2. `hooks/pre_gen_project.py` validates input (project_slug format, conflicting options)\n3. Jinja2 renders all files under `{{cookiecutter.project_slug}}/` with user choices\n4. `hooks/post_gen_project.py` (~550 lines) removes files not needed for the chosen options, generates random secrets, and adjusts config files\n\n### Key Files\n\n- **`cookiecutter.json`** — All template variables and their choices (project name, Docker, Celery, cloud provider, frontend pipeline, etc.)\n- **`hooks/pre_gen_project.py`** — Pre-generation validation (uses Jinja2 syntax at the top for context manipulation)\n- **`hooks/post_gen_project.py`** — Post-generation cleanup: removes files based on user choices, generates Django secret key, sets DB credentials, modifies package.json and .pre-commit-config.yaml\n- **`{{cookiecutter.project_slug}}/`** — The template directory; files here use Jinja2 conditionals (`{% if cookiecutter.use_celery == 'y' %}`) to include/exclude content\n\n### Test Structure\n\n- **`tests/test_cookiecutter_generation.py`** — Main test file. Uses `pytest-cookies` to bake the template with 50+ option combinations defined in `SUPPORTED_COMBINATIONS`. Verifies: no Jinja syntax left in output, generated code passes linting, correct files present/absent. Skips on Windows (sh module) and macOS CI (slow).\n- **`tests/test_hooks.py`** — Unit tests for hook helper functions\n- **`tests/test_bare.sh`** / **`tests/test_docker.sh`** — Integration tests that generate a project and run its full test suite\n\n### Generated Project Layout\n\nThe generated Django project uses:\n\n- `config/settings/{base,local,test,production}.py` — Split settings with django-environ\n- `config/urls.py` — URL routing\n- `<project_slug>/users/` — Custom user model (username or email-based auth via django-allauth)\n- `compose/` — Docker configs for local and production\n- `requirements/` — Not used; dependencies managed via `pyproject.toml` + `uv.lock`\n\n## Conventions\n\n- **Python 3.14** required (`requires-python = \"==3.14.*\"`)\n- **Line length**: 119 characters (ruff and djlint)\n- **Ruff** for linting/formatting; config in `pyproject.toml` under `[tool.ruff]`\n- **djLint** for HTML template linting with `profile = \"jinja\"`\n- Template files under `{{cookiecutter.project_slug}}/` are excluded from ruff (not parseable Python)\n- **Calendar versioning**: `YYYY.MM.DD`\n\n## Adding a New Template Option\n\n1. Add the variable and choices to `cookiecutter.json`\n2. Add validation in `hooks/pre_gen_project.py` if needed\n3. Add file removal/modification logic in `hooks/post_gen_project.py`\n4. Use Jinja2 conditionals in template files: `{% if cookiecutter.option == 'y' %}`\n5. Add test combinations to `SUPPORTED_COMBINATIONS` in `tests/test_cookiecutter_generation.py`\n"},"files":{"AGENTS.md":"# AGENTS.md\n\nThis file provides guidance to AI coding agents when working with code in this repository.\n\n## What This Project Is\n\ncookiecutter-django is a **Cookiecutter template** that generates production-ready Django projects. It is NOT a Django application itself — it's a Jinja2-templated project scaffold. The generated project lives inside `{{cookiecutter.project_slug}}/` and gets processed by Cookiecutter when users run the generator.\n\n## Commands\n\n### Install dependencies\n\n```bash\nuv sync --locked\n```\n\n### Run tests\n\n```bash\n# Full test suite (parallel, via tox)\nuv run tox run -e py\n\n# Direct pytest (parallel)\nuv run pytest -n auto tests\n\n# Single test\nuv run pytest tests/test_cookiecutter_generation.py -k \"test_name\"\n\n# Run with auto-fixable style checks enabled\nAUTOFIXABLE_STYLES=1 uv run pytest -n auto tests\n```\n\n### Linting and formatting\n\n```bash\n# Run all pre-commit hooks\nuv run pre-commit run --all-files\n\n# Ruff only\nuv run ruff check --fix\nuv run ruff format\n```\n\n### Integration tests (require Docker or PostgreSQL+Redis)\n\n```bash\n# Docker-based\nsh tests/test_docker.sh                          # defaults\nsh tests/test_docker.sh use_celery=y use_drf=y   # with options\n\n# Bare metal (needs PostgreSQL and Redis running)\nsh tests/test_bare.sh\nsh tests/test_bare.sh use_celery=y frontend_pipeline=Gulp\n```\n\n### Generate a project locally for debugging\n\n```bash\nuv run cookiecutter . --no-input --output-dir=/tmp/debug\n```\n\n## Architecture\n\n### Template Generation Flow\n\n1. User runs `cookiecutter` — prompted with options from `cookiecutter.json`\n2. `hooks/pre_gen_project.py` validates input (project_slug format, conflicting options)\n3. Jinja2 renders all files under `{{cookiecutter.project_slug}}/` with user choices\n4. `hooks/post_gen_project.py` (~550 lines) removes files not needed for the chosen options, generates random secrets, and adjusts config files\n\n### Key Files\n\n- **`cookiecutter.json`** — All template variables and their choices (project name, Docker, Celery, cloud provider, frontend pipeline, etc.)\n- **`hooks/pre_gen_project.py`** — Pre-generation validation (uses Jinja2 syntax at the top for context manipulation)\n- **`hooks/post_gen_project.py`** — Post-generation cleanup: removes files based on user choices, generates Django secret key, sets DB credentials, modifies package.json and .pre-commit-config.yaml\n- **`{{cookiecutter.project_slug}}/`** — The template directory; files here use Jinja2 conditionals (`{% if cookiecutter.use_celery == 'y' %}`) to include/exclude content\n\n### Test Structure\n\n- **`tests/test_cookiecutter_generation.py`** — Main test file. Uses `pytest-cookies` to bake the template with 50+ option combinations defined in `SUPPORTED_COMBINATIONS`. Verifies: no Jinja syntax left in output, generated code passes linting, correct files present/absent. Skips on Windows (sh module) and macOS CI (slow).\n- **`tests/test_hooks.py`** — Unit tests for hook helper functions\n- **`tests/test_bare.sh`** / **`tests/test_docker.sh`** — Integration tests that generate a project and run its full test suite\n\n### Generated Project Layout\n\nThe generated Django project uses:\n\n- `config/settings/{base,local,test,production}.py` — Split settings with django-environ\n- `config/urls.py` — URL routing\n- `<project_slug>/users/` — Custom user model (username or email-based auth via django-allauth)\n- `compose/` — Docker configs for local and production\n- `requirements/` — Not used; dependencies managed via `pyproject.toml` + `uv.lock`\n\n## Conventions\n\n- **Python 3.14** required (`requires-python = \"==3.14.*\"`)\n- **Line length**: 119 characters (ruff and djlint)\n- **Ruff** for linting/formatting; config in `pyproject.toml` under `[tool.ruff]`\n- **djLint** for HTML template linting with `profile = \"jinja\"`\n- Template files under `{{cookiecutter.project_slug}}/` are excluded from ruff (not parseable Python)\n- **Calendar versioning**: `YYYY.MM.DD`\n\n## Adding a New Template Option\n\n1. Add the variable and choices to `cookiecutter.json`\n2. Add validation in `hooks/pre_gen_project.py` if needed\n3. Add file removal/modification logic in `hooks/post_gen_project.py`\n4. Use Jinja2 conditionals in template files: `{% if cookiecutter.option == 'y' %}`\n5. Add test combinations to `SUPPORTED_COMBINATIONS` in `tests/test_cookiecutter_generation.py`\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# AGENTS.md\n\nThis file provides guidance to AI coding agents when working with code in this repository.\n\n## What This Project Is\n\ncookiecutter-django is a **Cookiecutter template** that generates production-ready Django projects. It is NOT a Django application itself — it's a Jinja2-templated project scaffold. The generated project lives inside `{{cookiecutter.project_slug}}/` and gets processed by Cookiecutter when users run the generator.\n\n## Commands\n\n### Install dependencies\n\n```bash\nuv sync --locked\n```\n\n### Run tests\n\n```bash\n# Full test suite (parallel, via tox)\nuv run tox run -e py\n\n# Direct pytest (parallel)\nuv run pytest -n auto tests\n\n# Single test\nuv run pytest tests/test_cookiecutter_generation.py -k \"test_name\"\n\n# Run with auto-fixable style checks enabled\nAUTOFIXABLE_STYLES=1 uv run pytest -n auto tests\n```\n\n### Linting and formatting\n\n```bash\n# Run all pre-commit hooks\nuv run pre-commit run --all-files\n\n# Ruff only\nuv run ruff check --fix\nuv run ruff format\n```\n\n### Integration tests (require Docker or PostgreSQL+Redis)\n\n```bash\n# Docker-based\nsh tests/test_docker.sh                          # defaults\nsh tests/test_docker.sh use_celery=y use_drf=y   # with options\n\n# Bare metal (needs PostgreSQL and Redis running)\nsh tests/test_bare.sh\nsh tests/test_bare.sh use_celery=y frontend_pipeline=Gulp\n```\n\n### Generate a project locally for debugging\n\n```bash\nuv run cookiecutter . --no-input --output-dir=/tmp/debug\n```\n\n## Architecture\n\n### Template Generation Flow\n\n1. User runs `cookiecutter` — prompted with options from `cookiecutter.json`\n2. `hooks/pre_gen_project.py` validates input (project_slug format, conflicting options)\n3. Jinja2 renders all files under `{{cookiecutter.project_slug}}/` with user choices\n4. `hooks/post_gen_project.py` (~550 lines) removes files not needed for the chosen options, generates random secrets, and adjusts config files\n\n### Key Files\n\n- **`cookiecutter.json`** — All template variables and their choices (project name, Docker, Celery, cloud provider, frontend pipeline, etc.)\n- **`hooks/pre_gen_project.py`** — Pre-generation validation (uses Jinja2 syntax at the top for context manipulation)\n- **`hooks/post_gen_project.py`** — Post-generation cleanup: removes files based on user choices, generates Django secret key, sets DB credentials, modifies package.json and .pre-commit-config.yaml\n- **`{{cookiecutter.project_slug}}/`** — The template directory; files here use Jinja2 conditionals (`{% if cookiecutter.use_celery == 'y' %}`) to include/exclude content\n\n### Test Structure\n\n- **`tests/test_cookiecutter_generation.py`** — Main test file. Uses `pytest-cookies` to bake the template with 50+ option combinations defined in `SUPPORTED_COMBINATIONS`. Verifies: no Jinja syntax left in output, generated code passes linting, correct files present/absent. Skips on Windows (sh module) and macOS CI (slow).\n- **`tests/test_hooks.py`** — Unit tests for hook helper functions\n- **`tests/test_bare.sh`** / **`tests/test_docker.sh`** — Integration tests that generate a project and run its full test suite\n\n### Generated Project Layout\n\nThe generated Django project uses:\n\n- `config/settings/{base,local,test,production}.py` — Split settings with django-environ\n- `config/urls.py` — URL routing\n- `<project_slug>/users/` — Custom user model (username or email-based auth via django-allauth)\n- `compose/` — Docker configs for local and production\n- `requirements/` — Not used; dependencies managed via `pyproject.toml` + `uv.lock`\n\n## Conventions\n\n- **Python 3.14** required (`requires-python = \"==3.14.*\"`)\n- **Line length**: 119 characters (ruff and djlint)\n- **Ruff** for linting/formatting; config in `pyproject.toml` under `[tool.ruff]`\n- **djLint** for HTML template linting with `profile = \"jinja\"`\n- Template files under `{{cookiecutter.project_slug}}/` are excluded from ruff (not parseable Python)\n- **Calendar versioning**: `YYYY.MM.DD`\n\n## Adding a New Template Option\n\n1. Add the variable and choices to `cookiecutter.json`\n2. Add validation in `hooks/pre_gen_project.py` if needed\n3. Add file removal/modification logic in `hooks/post_gen_project.py`\n4. Use Jinja2 conditionals in template files: `{% if cookiecutter.option == 'y' %}`\n5. Add test combinations to `SUPPORTED_COMBINATIONS` in `tests/test_cookiecutter_generation.py`\n","category":"root","tokens":1080}]}