Skip to main content

django-starter-cdc

Generate a new Django 6.1 project from django-starter: either a full-stack app (Django templates, HTMX, Alpine.js, Tailwind) or an API-only backend (Django REST Framework + allauth headless).

The generator has no dependencies of its own. It needs Python 3.14 or newer: on an older Python, pip stops with "requires a different Python". The projects it creates are managed with uv (plus npm for the full variant), so install uv however you install the generator.

Install

With uv (recommended). uvx runs the generator in a throwaway environment, so there is nothing to install or upgrade, and uv fetches Python 3.14 for you if needed:

uvx django-starter-cdc

With pip and a virtual environment. Following the Python Packaging User Guide, create and activate a virtual environment with Python 3.14, then install the package into it:

python3.14 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
python -m pip install --upgrade pip
python -m pip install django-starter-cdc
django-starter-cdc --version

Run deactivate when you're done. python -m django_starter_cdc works too, in place of the django-starter-cdc command. To upgrade later, run python -m pip install --upgrade django-starter-cdc.

With pipx, to keep the command available everywhere without managing a virtual environment yourself:

pipx install --python python3.14 django-starter-cdc

Usage

Run the one command and answer two questions:

$ django-starter-cdc
Project name: myproject
Project type:
  1) Full: Django templates, HTMX, Alpine.js and Tailwind, plus the API
  2) API only: DRF + allauth headless with OpenAPI docs, no templates or npm
Choose 1 or 2 [1]:

(With uv, run uvx django-starter-cdc.) To skip the questions, for example in a script, pass the answers instead:

django-starter-cdc myproject --full   # full variant
django-starter-cdc myproject --api    # API-only variant

Without a terminal there is no one to answer, so the name is required and the type defaults to full. Version 0.1.0 used a new subcommand (django-starter-cdc new myproject); that form still works.

This downloads the django-starter release that matches the generator's version, renders the chosen variant into ./myproject, writes a .env with a fresh SECRET_KEY, runs git init and then make init (installs dependencies and migrates the SQLite database). Then:

cd myproject
make start

and open http://localhost:8000/admin/ and http://localhost:8000/api/schema/swagger-ui/.

Options

django-starter-cdc [<name>] [--api | --full] [--email EMAIL] [--ref REF | --source PATH]
                   [--no-install] [--no-git] [--dir PATH]
Option What it does
<name> Project name: a lowercase slug of letters, digits, - and _ that starts with a letter. Used for the directory, the Python/npm package name and the <NAME>_ env-var prefix. Asked for if you leave it out.
--api Generate the API-only variant (see below) without asking.
--full Generate the full variant without asking.
--email EMAIL Address used for ADMINS, DEFAULT_FROM_EMAIL and the API contact (default admin@example.com).
--ref REF Download a branch, tag or commit instead of the matching release, e.g. --ref main.
--source PATH Copy a local django-starter checkout instead of downloading. .git, node_modules, .venv, .env, db.sqlite3 and build output are left out.
--no-install Skip make init; the manual setup steps are printed instead.
--no-git Skip git init.
--dir PATH Parent directory to create the project in (default: the current directory).

The target directory must not exist or must be empty. If make, uv or (for the full variant) npm is not installed, the generator skips make init and prints the equivalent steps: uv sync, npm install && npm run build (full only) and uv run python manage.py migrate.

Variants

Both variants share the same core: Django 6.1 on Python 3.14, a custom user model, django-allauth with headless mode, Django REST Framework with a drf-spectacular OpenAPI schema, Django's built-in tasks framework, SQLite for local development and a Docker Compose stack (Postgres + Redis + gunicorn) for production.

Full (default) adds the server-rendered web app: Django templates, HTMX and Alpine.js for interactivity, Tailwind CSS 4 built with the Tailwind CLI (no JavaScript bundler), allauth's account pages, a profile page, sitemaps and meta tags.

API-only (--api) has no templates (other than the allauth email templates), no front-end assets and no npm. allauth runs with HEADLESS_ONLY = True, so authentication is a JSON API meant for a separate front end or mobile app.

Authentication API

allauth headless serves its auth API under /_allauth/. Mobile and other non-browser clients use the app client, which authenticates with a session token instead of cookies:

Endpoint Purpose
POST /_allauth/app/v1/auth/signup Create an account.
POST /_allauth/app/v1/auth/login Log in with email and password.
GET /_allauth/app/v1/auth/session Check the current session.
DELETE /_allauth/app/v1/auth/session Log out.

A successful signup or login returns meta.session_token. Send it as the X-Session-Token header on later requests, both to the allauth endpoints and to your own API views:

curl -s -X POST http://localhost:8000/_allauth/app/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email": "you@example.com", "password": "..."}'

curl -s http://localhost:8000/api/users/me/ -H 'X-Session-Token: <session_token>'

GET /api/users/me/ is the sample DRF endpoint: it returns the logged-in user. While DEBUG is on, the full allauth API reference is served at http://localhost:8000/_allauth/openapi.html, and your own DRF endpoints are documented at http://localhost:8000/api/schema/swagger-ui/.

Browser front ends can use the browser client (/_allauth/browser/v1/...), which uses Django's session cookie and CSRF token. A browser SPA served from another origin (for example a Vite dev server on port 5173) will also want django-cors-headers to allow its origin.

License

MIT

Metadata

Release files for django-starter-cdc 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-starter-cdc 0.2.0
File Size Uploaded Provenance Actions
django_starter_cdc-0.2.0.tar.gz 14.8 kB With provenance Details for django_starter_cdc-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-starter-cdc 0.2.0
File Interpreter ABI Platform Actions
django_starter_cdc-0.2.0-py3-none-any.whl Python 3 none any Details for django_starter_cdc-0.2.0-py3-none-any.whl

Total release size: 28.4 kB

Release files / django_starter_cdc-0.2.0.tar.gz

Download URL django_starter_cdc-0.2.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3c77f85f5f82e12f68179509af85ba1f1e254c5b7e642fb0319d3e0ae65ae6f1
BLAKE2b-256 checksum
How to use checksums
392d5d33c9b7160d7b4816c49aa46bcc07722672f338a7c46fd289e0bf0e10dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / django_starter_cdc-0.2.0-py3-none-any.whl

Download URL django_starter_cdc-0.2.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9ece2cfdaf6273248ce886b7e2f94c50d7542e86ecb7263cedb221bfb9e9133
BLAKE2b-256 checksum
How to use checksums
c00c2f933da3b4a06991b54e9221fe892424b7d0263e6bc86a127dd9c7966649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for django-starter-cdc 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_starter_cdc-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page