Skip to content

Sync django-view-auth with the updated tutorial - #994

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/django-view-authorization-20261204
Dec 4, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/django-view-authorization-20261204

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Syncs django-view-auth with the maintenance update of Get Started With Django Part 3: Django View Authorization.

Changes

  • requirements.txt: Django 3.0.7 -> 5.2.20 (current LTS). Django 3.0 imports distutils, which Python 3.12 removed.
  • settings.py: BASE_DIR uses pathlib like a Django 5.2 startproject; DIRS and the database path use BASE_DIR / ...; dropped the debug context processor (matches the article listing) and the removed USE_L10N setting; set DEFAULT_AUTO_FIELD = "django.db.models.AutoField" so the existing migration stays valid.
  • templates/base.html: adds a POST logout form, since Django 5.0 removed logging out via GET (/accounts/logout/ now returns 405).
  • README.md: tested versions (Python 3.14, Django 5.2.20) and the Python 3.10 floor.

Draft: https://realpython.com/pbjt/blog/post/2763/change/
Card: https://trello.com/c/L4WHVoiI

Verified on Python 3.14.10 with Django 5.2.20: manage.py check (no issues), makemigrations --check (no changes), migrate, loaddata core.json, then a test-client walk through every view: listing, view_blog, see_request (<QueryDict: {'breakfast': ['spam'], 'lunch': ['spam']}>), login redirect on private_place, staff_place for bob (302) and silvia (200), add_messages + messages shown on listing, GET logout 405 and POST logout logs out. ruff format --check, ruff check, and dircheck.py pass.

🤖 Generated with Claude Code

realpython-bot and others added 2 commits December 4, 2026 06:06
Django 5.2.20 LTS, pathlib-based settings, and a POST logout form in
base.html (Django 5.0 removed logout via GET).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realpython-bot
realpython-bot merged commit 3a46712 into master Dec 4, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/django-view-authorization-20261204 branch December 4, 2026 07:14
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