Skip to content

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented May 19, 2024

Description

This PR updates django CMS snippet to become universal, i.e. support django CMS 3.11, 4.0, and 4.1.

All features from the support/django-cms-4.0.x branch are included.

  • The data structure for django CMS 3 changes, and a SnippetGrouper model is introduced. This has no impact on end-users
  • Snippets can be site-specific.
  • Together with django CMS 4 and djangocms-versioning, snippets can be versioned.

This will be the base for version 5 of djangocms-snippet:

  • Version <=3.x: django CMS 3.x
  • Version <=4.x: django CMS 4.0/4.1 only
  • Version >=5: Universal

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

adam-murray and others added 30 commits September 8, 2021 17:16
Changes partially taken from this change: a56091c

Requires additional work when the django-cms 4.0 workstream is official, the version bump code has been ignored because it would generate official releases only: #116
* init support for django4.2

* add change log for add compatiable for django 4.2 and python 3.10

* Update CHANGELOG.rst

* Update .pre-commit-config.yaml

* fix lint config issue

* remove test code

* add blackline for flake8

* add pyproject.toml file

* add requirement files

* fix ci failed issue

* format setup.py import section

* upgrade isort version to fix pre commit ci issue

* upgrade the django-upgrade package to pass through the pre commit ci test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* upgrade packages in pre commit

* resort init file changes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* comment the django-upgrade from ci

* fix: add missing migration file

* fix: update previous file instead of creating new file

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Josh Peng Yu <joshyupeng@gmail.com>
* Added site field in models n site filter in admin

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated versioning branch

* Add test cases and updated the implementation

* Update CHANGELOG.rst

Co-authored-by: Mark Walker <theshow@gmail.com>

* corrected formatting

* fixed flake8 issues

* removed list_filter

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mark Walker <theshow@gmail.com>
* bump version to 4.1.0

* bump version to 4.1.0 pyproject.toml

* replace test requirement url

* update changelog date

* update release date.
@fsbraun fsbraun marked this pull request as ready for review May 27, 2024 10:53
@fsbraun fsbraun requested a review from a team May 27, 2024 10:53
@fsbraun
Copy link
Member Author

fsbraun commented May 27, 2024

@joshyu Can you have a look at this? It should also work with django CMS 4.0. I'd appreciate if you found time to test.

@fsbraun fsbraun requested a review from marksweb June 19, 2024 10:08
@joshyu
Copy link
Contributor

joshyu commented Aug 20, 2024

@fsbraun
I add a comment in the issue above, I try to install snippet addon to djangocms-quickstart project, but failed to install with some error. Please help to check the message I left in the above issue?

@joshyu
Copy link
Contributor

joshyu commented Aug 20, 2024

@fsbraun ,
Can we update the MANIFEST.in as below:
image

@fsbraun
Copy link
Member Author

fsbraun commented Aug 20, 2024

@joshyu Interesting since MANIFEST.in was not modified. It needs to be updated to also include template files. I'll do the update.

* fix: manifest.in

* fix: SnippetAdmin use overrdden change_form_template

* ci: auto fixes from pre-commit hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@joshyu
Copy link
Contributor

joshyu commented Aug 20, 2024

@fsbraun ,

I think you also need to include *.po in the MANIFEST.in , otherwise the locale directory will be excluded from the setup package.

image

@fsbraun
Copy link
Member Author

fsbraun commented Aug 20, 2024

@joshyu Fixed.

@fsbraun fsbraun merged commit 5069d82 into master Aug 20, 2024
10 checks passed
@fsbraun fsbraun deleted the feat/universal branch August 20, 2024 09:22
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.