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

No page fallbacks possible with djangocms-versioning / general design question #359

Open
benzkji opened this issue Oct 30, 2023 · 3 comments

Comments

@benzkji
Copy link

benzkji commented Oct 30, 2023

I'm drafting a PoC for very simple (published/unpublished) versioining:
https://github.com/benzkji/djangocms-no-versioning

Currently, many things were copied from djangocms-versioning, as well for example, code in cms_menus.py. As I understood the code, there will be no page level language fallbacks anymore, when using djangocms-versioning? So, currently, the menu tags work differently, depending if using versioning or not?

In general, I think it should be possible to refactor the cms_menus.py of the cms itself in a way, so that we dont have to override it. As cms_menus.py of djangocms-versioning (as well as my PoC one's) are very similar, and have many lines/logic that belong in the cms (IMHO) only, and would generate more maintainance work, when things change?

@fsbraun
Copy link
Sponsor Member

fsbraun commented Oct 31, 2023

I think this is an interesting point, and that a refactor seems possible w/o knowing about any details of versioning. Ideally, versioning (or no-versinging) needs not to change anything with cms_menus.

@benzkji
Copy link
Author

benzkji commented Oct 31, 2023

It's really only a few lines. One difference is the inclusion of unpublished pagecontent in the menu.

Also, the cms_menus.py of the cms itself could serve as kind of a reference implementation, when creating third party apps that use cms menus. And support versioning...

@fsbraun
Copy link
Sponsor Member

fsbraun commented Oct 31, 2023

The CMS itself has the means of managing this distinction (admin_manager). I think that's worth a try. Then the CMS implementation would be a reference for other models (besides pages) on how to implement menus with and without versioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants