# Path: hedwig/core/settings.py
# class Settings(object):
#     """
#     A settings object, that allows HEDWIG settings to be accessed as properties.
#     """
# 
#     def __init__(self, user_settings=None, defaults=None):
#         self.user_settings = user_settings or {}
#         self.defaults = defaults or DEFAULTS
#         if isinstance(self.user_settings, dict):
#             self.user_settings = dict_merge(self.defaults, self.user_settings)
#         else:
#             raise TypeError("Expected settings to be a dict")
# 
#     def __getattr__(self, attr):
#         if attr not in self.defaults.keys():
#             raise AttributeError("Invalid HEDWIG setting: '%s'" % attr)
# 
#         try:
#             # Check if present in user settings
#             val = self.user_settings[attr]
#         except KeyError:
#             # Fall back to defaults
#             val = self.defaults[attr]
# 
#         # Cache the result
#         setattr(self, attr, val)
#         return val
# 
#     def __getitem__(self, item):
#         return getattr(self, item)


from hedwig.core.settings import Settings
from django.conf import settings

REST_FRAMEWORK_DEFAULTS = {
    'SERIALIZER_SIGNALS': True
}

HEDWIG_REST_FRAMEWORK_USER_SETTINGS = getattr(settings, 'HEDWIG_REST_FRAMEWORK', None)


# Path: hedwig/core/settings.py
# class Settings(object):
#     """
#     A settings object, that allows HEDWIG settings to be accessed as properties.
#     """
# 
#     def __init__(self, user_settings=None, defaults=None):
#         self.user_settings = user_settings or {}
#         self.defaults = defaults or DEFAULTS
#         if isinstance(self.user_settings, dict):
#             self.user_settings = dict_merge(self.defaults, self.user_settings)
#         else:
#             raise TypeError("Expected settings to be a dict")
# 
#     def __getattr__(self, attr):
#         if attr not in self.defaults.keys():
#             raise AttributeError("Invalid HEDWIG setting: '%s'" % attr)
# 
#         try:
#             # Check if present in user settings
#             val = self.user_settings[attr]
#         except KeyError:
#             # Fall back to defaults
#             val = self.defaults[attr]
# 
#         # Cache the result
#         setattr(self, attr, val)
#         return val
# 
#     def __getitem__(self, item):
#         return getattr(self, item)


# Path: hedwig/rest_framework/settings.py
from hedwig.core.settings import Settings
from django.conf import settings


REST_FRAMEWORK_DEFAULTS = {
    'SERIALIZER_SIGNALS': True
}

HEDWIG_REST_FRAMEWORK_USER_SETTINGS = getattr(settings, 'HEDWIG_REST_FRAMEWORK', None)


hedwig_rest_framework_settings = Settings(HEDWIG_REST_FRAMEWORK_USER_SETTINGS, REST_FRAMEWORK_DEFAULTS)