Skip to content

Upgrade to Django 5.2 LTS#1507

Merged
ihalaij1 merged 1 commit intoapluslms:masterfrom
sayravai:Django5.2
Apr 28, 2026
Merged

Upgrade to Django 5.2 LTS#1507
ihalaij1 merged 1 commit intoapluslms:masterfrom
sayravai:Django5.2

Conversation

@sayravai
Copy link
Copy Markdown
Contributor

@sayravai sayravai commented Mar 9, 2026

Description

Django 4.2 LTS support ends in April 2026, which is next month. We should upgrade all production Django projects to 5.2, so let's kick this off by this PR, which is essentially changes made by the django-upgrade script in the current a-plus repo.

Comment thread exercise/views.py

# Redirect back to the previous page
return redirect(request.META.get('HTTP_REFERER', '/'))
return redirect(request.headers.get('referer', '/'))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
Comment thread exercise/views.py

# Redirect back to the previous page
return redirect(request.META.get('HTTP_REFERER', '/'))
return redirect(request.headers.get('referer', '/'))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
Comment thread userprofile/views.py
pseudonymize = request.session.get("pseudonymize", False)
request.session["pseudonymize"] = not pseudonymize
return HttpResponseRedirect(request.META.get("HTTP_REFERER", "/"))
return HttpResponseRedirect(request.headers.get("referer", "/"))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
@sayravai sayravai moved this to In progress in A+ sprints Mar 31, 2026
@ihalaij1 ihalaij1 force-pushed the Django5.2 branch 7 times, most recently from 6c83b58 to e68bca5 Compare April 24, 2026 11:08
@ihalaij1 ihalaij1 marked this pull request as ready for review April 24, 2026 11:08
@ihalaij1 ihalaij1 changed the title Mentally prepare for Django 5.2 upgrade Upgrade to Django 5.2 LTS Apr 24, 2026
@ihalaij1 ihalaij1 self-requested a review April 24, 2026 11:09
@ihalaij1 ihalaij1 self-assigned this Apr 24, 2026
Copy link
Copy Markdown
Contributor

@ihalaij1 ihalaij1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test this more after it is merged to the master branch.

@ihalaij1 ihalaij1 merged commit 3c3436f into apluslms:master Apr 28, 2026
8 checks passed
@ihalaij1 ihalaij1 moved this from In progress to Done in A+ sprints Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants