django-cms / djangocms-versioning

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

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

Open benzkji opened 8 months ago

benzkji commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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.