Repository navigation
Sync django-view-auth with the updated tutorial - #994
Merged
realpython-bot merged 2 commits intoDec 4, 2026
Merged
Conversation
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
deleted the
maintenance/django-view-authorization-20261204
branch
December 4, 2026 07:14
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.
Syncs
django-view-authwith 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 importsdistutils, which Python 3.12 removed.settings.py:BASE_DIRusespathliblike a Django 5.2startproject;DIRSand the database path useBASE_DIR / ...; dropped thedebugcontext processor (matches the article listing) and the removedUSE_L10Nsetting; setDEFAULT_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, anddircheck.pypass.🤖 Generated with Claude Code