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

Django 4.1 and other requirements #1799

Merged
merged 5 commits into from
Aug 29, 2022

Conversation

niklasmohrin
Copy link
Member

Closes #1796

See commit messages. The ideas about using constraints instead of asserts from the issue can be done in another PR. The cached template things don't seem to be a problem, I get new html after editing files without restarting the server.

Among the breaking changes, there is one that immediatly causes problems:

    In order to unify the behavior with many-to-many relations for
    unsaved model instances, a reverse foreign key now raises ValueError
    when calling related managers for unsaved objects.

    https://docs.djangoproject.com/en/4.1/releases/4.1/#reverse-foreign-key-changes-for-unsaved-model-instances

As a quickfix, I added `pk is not None` in two places, I am not sure
yet whether this is exactly what we want though.
We still get errors with logged models when upgrading `django-stubs`
(see e-valuation#1767).
With Django 4.1, `collectstatic` apparently cares about sourcemaps and
complains about a missing one after the update. The css file for
tom-select's bootstrap css had the indicator comment for a corresponding
source map, but we didn't have the file. Removing the indicator comment
works too, but that would mean that we distribute a modififed version of
the css file.
@niklasmohrin
Copy link
Member Author

There is a new version of pylint already (2.15.0), but that throws errors when combining Q objects with binary operators. Let's stick to 2.14 until that is sorted out

@niklasmohrin niklasmohrin merged commit bf23bdf into e-valuation:main Aug 29, 2022
@niklasmohrin niklasmohrin deleted the django-4.1 branch August 29, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Update to django 4.1
2 participants