Skip to content
Snippets Groups Projects
Verified Commit aa3da412 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

#186: common utils for moving settings to preferences

parent e226d60c
No related branches found
No related tags found
No related merge requests found
from django.conf import settings
from dynamic_preferences.registries import global_preferences_registry
class DefaultFromSettingMixin(object):
def get_default(self):
return getattr(settings, self.setting)
def get(pref):
manager = global_preferences_registry.manager()
return manager[pref]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment