About modeltranslation in Admin, Django 4.2, Can anyone help me?

this no longer works with Django 4.2

@admin.register(Post)
class PostAdmin(TranslationAdmin):
    list_display = ('titre',)
    prepopulated_fields = {'slug': ('titre', ),}

    group_fieldsets = True
    
    class Media:
        js = (
            'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js',
            'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js',
            'modeltranslation/js/tabbed_translation_fields.js',
        )
        css = {
            'screen': ('modeltranslation/css/tabbed_translation_fields.css',),
        }

Please be more specific. Saying “this no longer works” doesn’t really identify a problem.

If you’re getting an error message, post the complete error along with any traceback message being generated.

If there’s no error message, describe in detail what you’re seeing and why you think it’s incorrect.

1 Like

i means that 4.2 doesn’t support this little bit of code that designs model fields for translation. It’s just like the 4.1 I was using.

But what’s not working?

Are you getting an error message? If so, post the complete error and traceback.

Or are you just seeing different results? If so, post the full details about what you’re seeing and how that’s different than what you expect.

1 Like

Hi, observe the difference between these two screenshots: on version 4.1, you have to click on the language button to display the field, but you can see that it doesn’t work with the other one; all fields are displayed. Sorry i can’t send another screenshot

Have you upgraded the version of Django-modeltranslation that you are using? I see where the project is claiming 4.2.3 compatibility, so you may just need to upgrade it.

If you have upgraded it, you’ll want to make sure that your browser cache is cleared when you go to that page.

You’re also using a seriously old and obsolete version of jQuery. It would be hard to tell whether that’s going to work properly now either.

1 Like

Hello, use “modeltranslation/js/force_jquery.js” in js MEdia class. I’ts work on django 5.

    class Media:
        js = (
            "extra/js/jquery-ui.min.js",
            "modeltranslation/js/force_jquery.js",
            "modeltranslation/js/tabbed_translation_fields.js",
        )
        css = {
            "screen": ("modeltranslation/css/tabbed_translation_fields.css",),
        }

https://django-modeltranslation.readthedocs.io/en/latest/admin.html#using-tabbed-translation-fields