mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-05-18 04:01:13 +00:00
Update apps.py
This commit is contained in:
parent
304554f405
commit
372a2f31df
1 changed files with 2 additions and 2 deletions
|
|
@ -21,10 +21,10 @@ class ModeltranslationConfig(AppConfig):
|
|||
# update both the standard settings and the modeltranslation settings,
|
||||
# as we cannot guarantee the load order, and so django_modeltranslation
|
||||
# may bootstrap itself either before, or after, our ready() gets called.
|
||||
custom_fields = getattr(settings, 'MODELTRANSLATION_CUSTOM_FIELDS', ())
|
||||
custom_fields = getattr(settings, 'MODELTRANSLATION_CUSTOM_FIELDS', list())
|
||||
setattr(settings, 'MODELTRANSLATION_CUSTOM_FIELDS', list(set(custom_fields + wagtail_fields)))
|
||||
|
||||
mt_custom_fields = getattr(mt_settings, 'CUSTOM_FIELDS', ())
|
||||
mt_custom_fields = getattr(mt_settings, 'CUSTOM_FIELDS', list())
|
||||
setattr(mt_settings, 'CUSTOM_FIELDS', list(set(mt_custom_fields + wagtail_fields)))
|
||||
|
||||
from modeltranslation.models import handle_translation_registrations
|
||||
|
|
|
|||
Loading…
Reference in a new issue