django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
33 stars 29 forks source link

feat: Add configuration to manage redirect on publish #358

Closed fsbraun closed 6 months ago

fsbraun commented 8 months ago

Description

Currently, upon publishing a page (or other content object) the user is redirected to the version admin of that object. This is excellent for power users.

This PR adds the setting DJANGOCMS_VERSIONING_ON_PUBLISH_REDIRECT with three possible values:

The default is "published".

This is a draft PR. Tests will work, once #357 is merged.

Related resources

Checklist

codecov[bot] commented 7 months ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (0d5b461) 90.95% compared to head (de69f81) 90.84%.

Files Patch % Lines
djangocms_versioning/admin.py 68.75% 3 Missing and 2 partials :warning:
djangocms_versioning/helpers.py 66.66% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #358 +/- ## ========================================== - Coverage 90.95% 90.84% -0.12% ========================================== Files 72 72 Lines 2533 2546 +13 Branches 356 361 +5 ========================================== + Hits 2304 2313 +9 - Misses 168 169 +1 - Partials 61 64 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fsbraun commented 7 months ago

@marksweb I've fixed the tests for this. For py3.12 they keep failing due to the django-app-helper dependency.