-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Django 4.2 support #262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look OK here, although the changes on djangocms-versioning regarding the button looks to be regression that may need to be fixed.
self.assertNotIn(archive_url, archive_link) | ||
if versioning_version < "2": | ||
# Edit link is inactive as `mock_is_obj_review_locked` is True | ||
self.assertIn("inactive", archive_link) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to be a regression of functionality in djangocms-versioning 2 where the edit link is disabled vs what appears to have been removed.
@fsbraun , about the failed pre-commit-config issue, It is related to the version of isort and other pre-commit plugins. Freeman and I ever met this errors while fixing another repo. refer to this: |
@fsbraun , about the failed tests, it is because that I didn't find when versionlock field in version instance is set, so I hard-code the version check and give the different return value. |
@joshyu Thanks for the explanation. To me, this is very helpful: So that actually is a desired behavior. I also understand FidelityInternational/djangocms-version-locking#80 now (an issue @marksweb raised a while ago)... Let me look into this, maybe we can identical results for CMS 4.0 and CMS 4.1 😃 |
Feat/django 4 2 support Bugfix
@fsbraun, |
@joshyu Pre-commit now passes. I'd like to look into the version locking effect on the collections with djangocms-versioning 2. Probably need today. Sufficient for you? |
@joshyu I've updated the tests to test the same outcomes for djangocms-versioning 1 and 2. For most tests that means, removing the version lock before the test. I've also added a test that ensures that locked versions are not added to collections. If you're ok, I can merge. |
@fsbraun , Thanks. |
Description
This PR updates djangocms-moderation to support Django 4.2 and 5.0. It is based on the ideas and work of #256 by @Aiky30 .
If fixes tests so they can run with django CMS 4.0 and django CMS 4.1
DJANGOCMS_VERSIONING_LOCK_VERSIONS
setting set toTrue
.Since aldryn-forms does not support Django 4.2, the optional
djangocms-moderation.contrib.moderation_forms
app has been discontinued.Currently, tests against django CMS 4.0 fail (against django CMS 4.1 everything is fine).
@joshyu: This is not an effect of this PR. Tests failed before already. Do you know why? I would love to get them in line.
Related resources
_get_archive_link
does not check thecheck_archive
condition djangocms-versioning#391Checklist