I have a problem where an error 404 occurs when I try to translate my custom model with the translate button in the custom TranslatableModelAdmin entry. If you need more information, don't hesitate to ask :)
For the project wagtail 4.1.1, wagtail-localize 1.3.3 and Django 4.1.3 where used.
from wagtail.contrib.modeladmin.options import ModelAdminGroup, modeladmin_register
from wagtail_localize.modeladmin.options import TranslatableModelAdmin
from app_models.employee_model import EmployeeModel
class MitarbeiterAdmin(TranslatableModelAdmin):
model = EmployeeModel
base_url_path = 'mitarbeiter-profile' # customise the URL from default to admin/mitarbeiter-profile
menu_icon = 'group'
list_display = ('fullname', 'organisationseinheit')
def fullname(self, obj):
return ("%s %s" % (obj.first_name, obj.last_name))
fullname.short_description = 'Name'
list_filter = ('organisationseinheit',)
search_fields = ('first_name', 'last_name')
# Now you just need to register your customised ModelAdmin class with Wagtail
modeladmin_register(MitarbeiterAdmin)
employee_model.py - omitted panels for readability
Hi everyone,
I have a problem where an error 404 occurs when I try to translate my custom model with the translate button in the custom TranslatableModelAdmin entry. If you need more information, don't hesitate to ask :)
For the project wagtail 4.1.1, wagtail-localize 1.3.3 and Django 4.1.3 where used.
This is the console output:
wagtailhooks.py:
employee_model.py - omitted panels for readability
Base.py with apps, i18n and locale settings