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

TabbedTranslationAdmin Issue #676

Open
oxygen01 opened this issue Apr 4, 2023 · 6 comments
Open

TabbedTranslationAdmin Issue #676

oxygen01 opened this issue Apr 4, 2023 · 6 comments

Comments

@oxygen01
Copy link

oxygen01 commented Apr 4, 2023

I'm using TabbedTranslationAdmin in the admin class, and getting this result, any idea why?
Screenshot 2023-04-04 at 14 33 17

with thanks

@last-partizan
Copy link
Collaborator

Please show your admin code.

@oxygen01
Copy link
Author

oxygen01 commented Apr 5, 2023

  @admin.register(Question) 
  class QuestionAdmin(TabbedTranslationAdmin):

    list_display = ("title", "short_description",)
    ordering = ("title",)
    inlines = (AnswerInline,)
    search_fields = (
        "title",
        "short_description",
    )
    fieldsets = (
        (
            "Basis",
            {
                "fields": (
                    "title",
                    "short_description",
                    "img",
                    "note",
                )
            },
        ),
    )

@oxygen01
Copy link
Author

oxygen01 commented Apr 5, 2023

I think, it is one row for country and other for language, but don't know how to get rid of the country one!

@last-partizan
Copy link
Collaborator

Maybe your AnswerInline includes modeltranslation too? Try removing it.

@oxygen01
Copy link
Author

oxygen01 commented Apr 6, 2023

this the AnswerInline

class AnswerInline(admin.StackedInline):
    model = Answer
    extra = 0
    fields = (
        "title",
        "img",
        "text",
    )

@last-partizan
Copy link
Collaborator

Try investigating generated html code, does modeltranslation js files included twice?
If so, try to understand why.

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

No branches or pull requests

2 participants