0.5.0
ArticlesApp
This commit is contained in:
26
ArticlesApp/translation.py
Normal file
26
ArticlesApp/translation.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from modeltranslation.translator import translator, TranslationOptions, register
|
||||
from .models import *
|
||||
|
||||
@register(ArticleModel)
|
||||
class Article_TranslationOptions(TranslationOptions):
|
||||
|
||||
fields = (
|
||||
'name', 'description', 'seo_title', 'seo_description', 'seo_keywords', 'seo_text',
|
||||
'text'
|
||||
)
|
||||
|
||||
# translator.register(ArticleModel, Article_TranslationOptions)
|
||||
|
||||
|
||||
|
||||
@register(UserPageModel)
|
||||
class UserPage_TranslationOptions(TranslationOptions):
|
||||
|
||||
fields = (
|
||||
'name', 'description', 'seo_title', 'seo_description', 'seo_keywords', 'seo_text',
|
||||
'text'
|
||||
)
|
||||
|
||||
# translator.register(UserPageModel, UserPage_TranslationOptions)
|
||||
Reference in New Issue
Block a user