django-notifications/notifications/settings.py

17 lines
333 B
Python
Raw Normal View History

2018-05-30 05:18:33 +00:00
# -*- coding: utf-8 -*-
from django.conf import settings
CONFIG_DEFAULTS = {
'PAGINATE_BY': 20,
2018-05-31 02:03:57 +00:00
'USE_JSONFIELD': False,
2018-05-30 05:18:33 +00:00
'SOFT_DELETE': False
}
def get_config():
2018-05-30 05:21:16 +00:00
USER_CONFIG = getattr(settings, 'DJANGO_NOTIFICATIONS_CONFIG', {})
2018-05-30 05:18:33 +00:00
CONFIG = CONFIG_DEFAULTS.copy()
CONFIG.update(USER_CONFIG)
return CONFIG