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

Refactor get_title_obj in django-cms #212

Open
jonathan-s opened this issue Mar 11, 2020 · 1 comment
Open

Refactor get_title_obj in django-cms #212

jonathan-s opened this issue Mar 11, 2020 · 1 comment

Comments

@jonathan-s
Copy link
Contributor

jonathan-s commented Mar 11, 2020

When using django-cms together with versioning it's important to keep apart content/objects that should be displayed to the end user and content/objects that can be viewed by an admin user.

get_title_obj is used in several places to assign the object both in toolbars (admin related) and in places that will render to the end user.

There has been a lot of monkeypatching going on in djangocms-versioning to account for this fact. By creating a method get_admin_title_obj this method alone could be monkeypatched instead of spreading out the monkeypatching. If/when versioning is incorporated into core it would also make things easier to incorporate any monkeypatches into this method.

This will also start to setup us up for a clean separation between what is viewable by admin users and what is viewable by end users.

This is also related to the following PR > django-cms/django-cms#6817 instead of that implementation it would be better if it used get_admin_title_obj

@jonathan-s jonathan-s changed the title Refactor get_title_obj in django-cms Refactor get_title_obj in django-cms Mar 11, 2020
@jonathan-s
Copy link
Contributor Author

jonathan-s commented Mar 26, 2020

Current WIP for this can be found here #214

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

No branches or pull requests

1 participant