Add Django 6 support - #262
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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(notmaster) because it builds on the Bun migration and usesbun run …throughout. Retarget tomasteronce that branch lands.Changes
Add Django 6
lib/djangobuilder-core): addDjangoVersion.DJANGO6and bumpDEFAULT_DJANGO_VERSIONto6.6.xroutes toDJANGO6.6.0to thecli_testmatrix, excluding Python 3.11 (Django 6.0 requires Python 3.12+).About page
Verification
bun run test(174 core snapshots + smoke + io),bun run lint,bun run --filter=djangobuilder4 type-check, andbun run buildall pass. Built bundle confirmed: version options listDjango 3/4/5/6; About shows onlyDjango 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 install→makemigrations/migrate→manage.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)
DjangoVersionis a numeric enum, soDJANGO6 = 6.0stringifies to"6". Projects generated through the web apps therefore pinDjango==6and reference/en/6/docs URLs.Django==6still resolves to Django 6.0 via pip version padding, but a follow-up could switch the enum to string values to render6.0consistently. This is a pre-existing limitation that only surfaces forx.0majors.🤖 Generated with Claude Code