exclude mtg data field

This commit is contained in:
bakatrouble 2019-11-28 00:09:49 +03:00
parent f4149cabd4
commit 1f8ffb5cba
2 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ class CyberLinaBotModuleConfig(TelegramBotModuleConfig):
'welcome_reactions': JSONEditor(),
'inline_reactions': JSONEditor(),
}
EXCLUDE_FIELDS = '_mtg_data',
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View File

@ -63,7 +63,7 @@ def get_config_form(mdl):
class Meta:
model = mdl
exclude = ()
exclude = mdl.EXCLUDE_FIELDS if hasattr(mdl, 'EXCLUDE_FIELDS') else ()
widgets = mdl.CUSTOM_WIDGETS if hasattr(mdl, 'CUSTOM_WIDGETS') else {}
return ConfigForm