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

Admin of Page content versions takes far too long #380

Open
jrief opened this issue Feb 8, 2024 · 3 comments
Open

Admin of Page content versions takes far too long #380

jrief opened this issue Feb 8, 2024 · 3 comments

Comments

@jrief
Copy link
Contributor

jrief commented Feb 8, 2024

Our site currently has ~17k pages and if I click onto

Home › django CMS Versioning › Page content versions

a select box is created containing a select option for each of them. Since this uses Django's internal ModelChoiceIterator building that list of options takes far too long. It probably should be replaced by a lazy loading select field.

Anyway, my workaround to solve this problem is to completely disable that view in the admin view by adding

    def get_model_perms(self, request):
        return {}

to the class djangocms_versioning.admin.VersionAdmin.

For normal users, is there any reason why this interface must be part of the Django admin?

@fsbraun
Copy link
Member

fsbraun commented Feb 8, 2024

No, I do not think it is either helpful nor usable. One could redirect one level up to switch this off.

@jrief
Copy link
Contributor Author

jrief commented Feb 8, 2024

One could redirect one level up to switch this off.

I don't understand what you mean with this.

@fsbraun
Copy link
Member

fsbraun commented Feb 8, 2024

Sorry, I was not clear. "one level up" works only for the breadcrumb and is technically incorrect. What I meant:

I can imagine that the version admin changelist redirects to the changelist of the versioned object if no versioned object is selected.

/en/admin/djangocms_versioning/pagecontentversion/   --302-->  /en/admin/cms/pagecontent/

In the object changelist you can access versioning actions as well as select "manage versions" for a particular item.

The whole versioning section could go from the admin, provided the version changelist for specific objects remains accessible:
image

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

2 participants