Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Django 5.1 #3775

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Upgrade to Django 5.1 #3775

wants to merge 5 commits into from

Conversation

ColonelPhantom
Copy link
Contributor

Closes #3774

Summary

Upgrades to Django 5.1. Also uses the new {% querystring %} functionality. Additionally, it removes a use of get_storage_class because it was removed in this version. I looked at its implementation which just uses import_string so I decided to replace it with that.

How to test

  1. Check that the site still runs.
  2. Check that private media still loads.
  3. Check that pagination still works correctly.

@ColonelPhantom ColonelPhantom added the chore Something that is not a bug or a feature, does not change production behaviour label Aug 14, 2024
@ColonelPhantom
Copy link
Contributor Author

One problem seems to be remaining:

FileField now raises a FieldError when saving a file without a name.

However, I'm not sure what name to give to these file fields, so I'm not sure how to work around this.

@ColonelPhantom ColonelPhantom marked this pull request as draft August 14, 2024 18:13
@ColonelPhantom
Copy link
Contributor Author

Apparently we have a newsletter_filename function that overrides the filename field already...

Why the hell does Django mandate that we set it if it overrides it later anyway??

Anyway, I think using that function to get the name would be neater?

@ColonelPhantom
Copy link
Contributor Author

Actually, it seems like upload_to is intended to override the given filename? So I think it is fine as is. Unfortunately I cannot review as I made the PR :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Something that is not a bug or a feature, does not change production behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Django 5.1
2 participants