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

Does django-modeltranslation overwrites hidden fields in admin change view? #774

Open
adi- opened this issue Jan 13, 2025 · 1 comment
Open

Comments

@adi-
Copy link

adi- commented Jan 13, 2025

As described on jrief/django-admin-sortable2#415 I assume that (but not sure) django-modeltranslation could overwrite hidden fields used by other apps.

The problem is when I use django-admin-sortable2 app with django-modeltranslation. In normal use django-admin-sortable2 makes order field invisible in admin change view. But, when I add django-modeltranslation admin mixin this field is shown in edit view.

@last-partizan
Copy link
Collaborator

Hello.

Please take a look at the source code of SortableAdminMixin, and see how it's hiding fields.

Maybe you should switch order in which you're inheriting classes?

If that doesn't help - add new test to TranslationAdminTest checking for expected fields, then try inspecting code with pdb somewhere in SortableAdminMixin or TabbedTranslationAdmin to pinpoint the issue.

Report your findings here, and we'll think how this can be resolved.

We have some docs on how to set up project for development, https://github.com/deschler/django-modeltranslation/blob/master/docs/modeltranslation/contribute.rst (may be slightly outdated, but mostly works).

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