mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-05-12 15:23:09 +00:00
20 lines
451 B
Python
20 lines
451 B
Python
""" Django notifications settings file """
|
|
# -*- coding: utf-8 -*-
|
|
from django.conf import settings
|
|
|
|
CONFIG_DEFAULTS = {
|
|
"PAGINATE_BY": 20,
|
|
"USE_JSONFIELD": False,
|
|
"SOFT_DELETE": False,
|
|
"NUM_TO_FETCH": 10,
|
|
"CACHE_TIMEOUT": 2,
|
|
}
|
|
|
|
|
|
def get_config() -> dict[str, int | bool]:
|
|
user_config = getattr(settings, "DJANGO_NOTIFICATIONS_CONFIG", {})
|
|
|
|
config = CONFIG_DEFAULTS.copy()
|
|
config.update(user_config)
|
|
|
|
return config
|