Skip to content

Add Django 6 support - #262

Merged
mmcardle merged 5 commits into
chore/migrate-to-bunfrom
feat/django6
Jul 5, 2026
Merged

Add Django 6 support#262
mmcardle merged 5 commits into
chore/migrate-to-bunfrom
feat/django6

Conversation

@mmcardle

@mmcardle mmcardle commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Django 6 support, following the pattern of the "Django 5" change (#221). Generated projects can target Django 6.0, and Django 6 is the default for new projects.

Note

Base branch: this PR targets chore/migrate-to-bun (not master) because it builds on the Bun migration and uses bun run … throughout. Retarget to master once that branch lands.

Changes

Add Django 6

  • core (lib/djangobuilder-core): add DjangoVersion.DJANGO6 and bump DEFAULT_DJANGO_VERSION to 6.
  • djangobuilder.io / djangobuilder4: add Django 6 to every version picker; default new projects to Django 6; extend the stored-version → core-enum mapping so 6.x routes to DJANGO6.
  • CI: add 6.0 to the cli_test matrix, excluding Python 3.11 (Django 6.0 requires Python 3.12+).

About page

  • Show only the two most recent supported majors: Django 6.X and Django 5.X badges (dropped the 3.X/4.X badges). This is display-only — Django 3, 4, 5, and 6 all remain selectable/creatable.

Verification

bun run test (174 core snapshots + smoke + io), bun run lint, bun run --filter=djangobuilder4 type-check, and bun run build all pass. Built bundle confirmed: version options list Django 3/4/5/6; About shows only Django 5.X/Django 6.X.

Ran the generator's real output through Django 6.0 end-to-end (Python 3.14, uv) — base DRF and htmx variants both pass pip installmakemigrations/migratemanage.py check (0 issues) → pytest (4 passed). CI additionally runs the postgres + channels matrix for Django 6.0 on Python 3.12/3.13.

Known follow-up (not blocking)

DjangoVersion is a numeric enum, so DJANGO6 = 6.0 stringifies to "6". Projects generated through the web apps therefore pin Django==6 and reference /en/6/ docs URLs. Django==6 still resolves to Django 6.0 via pip version padding, but a follow-up could switch the enum to string values to render 6.0 consistently. This is a pre-existing limitation that only surfaces for x.0 majors.

🤖 Generated with Claude Code

mmcardle and others added 5 commits July 5, 2026 15:27
Adds Django 6 as a selectable version across the core library and both
app surfaces, mirroring the "Django 5" change (#221).

- core: add `DjangoVersion.DJANGO6` and bump `DEFAULT_DJANGO_VERSION` to 6
- djangobuilder.io: add the Django 6 option and map stored "6.x" versions
  to `DJANGO6`
- djangobuilder4: add Django 6 to the version choices and the store mapping
- CI: add Django 6.0 to the cli_test matrix (excluding Python 3.11, which
  Django 6.0 does not support)

Verified locally end-to-end: a generated Django 6.0 project installs,
runs makemigrations/migrate, passes `manage.py check`, and passes pytest
(base DRF and htmx variants) on Python 3.14.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMJB5ctT9zc4bggKpJxHKV
Follow-up to adding Django 6 support:

- About page (djangobuilder.io): show only Django 6.X and 5.X badges,
  drop the Django 3.X/4.X entries
- Version options: offer only Django 6 and 5 in the djangobuilder.io
  new-project form (schemas) and in both djangobuilder4 version pickers
  (create view + project header)
- djangobuilder4 create form: default the version to Django 6 (was
  Django 4, which is no longer a listed option)

Existing projects on Django 3/4 still generate correctly: the core
enum and the stored-version -> enum mappings in both stores are kept
for backward compatibility; only the selectable UI options changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMJB5ctT9zc4bggKpJxHKV
Correction: the previous change removed Django 3 and 4 from the version
pickers, but they should remain creatable. Restore Django 3 and 4 as
options in the djangobuilder.io new-project form and both djangobuilder4
pickers. The About page keeps showing only Django 6.X and 5.X.

New projects still default to Django 6 (the newest supported version),
consistent with djangobuilder.io's DEFAULT_DJANGO_VERSION.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMJB5ctT9zc4bggKpJxHKV
The version choice objects rendered as 6, 3.2, 4.1, 5.1 because JS hoists
the whole-number key "6" ahead of the decimal keys. List the entries
descending so the create form and project header show 6 / 5 / 4 / 3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMJB5ctT9zc4bggKpJxHKV
Replace the pointer-only stub (CLAUDE.md symlinks to this) with a
standalone overview: what Django Builder is, the Bun monorepo layout,
dev/test commands, how generation works, testing & CI, an "adding a new
Django version" checklist, and gotchas/learnings (numeric DjangoVersion
enum stringifying x.0 as "6", JS object key-ordering in the v4 pickers,
core consumed from src not dist, anonymous-login UI verification with the
Playwright chrome channel). Still links the docs/ deep-dives.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JMJB5ctT9zc4bggKpJxHKV
@mmcardle
mmcardle merged commit 971bbac into chore/migrate-to-bun Jul 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant