mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-03-16 22:10:30 +00:00
Moving translatable Page fields definition to the class
This commit is contained in:
parent
531a7494c2
commit
f7d748b7ee
1 changed files with 10 additions and 12 deletions
|
|
@ -9,18 +9,16 @@ except ImportError:
|
|||
from wagtail.wagtailcore.models import Page
|
||||
|
||||
|
||||
fields = (
|
||||
'title',
|
||||
'seo_title',
|
||||
'search_description',
|
||||
)
|
||||
if settings.TRANSLATE_SLUGS:
|
||||
fields += (
|
||||
'slug',
|
||||
'url_path',
|
||||
)
|
||||
|
||||
|
||||
@register(Page)
|
||||
class PageTR(TranslationOptions):
|
||||
fields = fields
|
||||
fields = (
|
||||
'title',
|
||||
'seo_title',
|
||||
'search_description',
|
||||
)
|
||||
if settings.TRANSLATE_SLUGS:
|
||||
fields += (
|
||||
'slug',
|
||||
'url_path',
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue