mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-05-17 11:41:13 +00:00
15 lines
471 B
Python
15 lines
471 B
Python
from modeltranslation.translator import TranslationOptions
|
|
|
|
|
|
class WagtailTranslationOptions(TranslationOptions):
|
|
def __init__(self, model):
|
|
from wagtail.wagtailcore.models import Page
|
|
if Page in model.__bases__:
|
|
self.fields += (
|
|
'title',
|
|
'slug',
|
|
'seo_title',
|
|
'search_description',
|
|
'url_path',)
|
|
|
|
super(WagtailTranslationOptions, self).__init__(model)
|