def update(self, key, value):
     try:
         setting = config_get(self.__group_map[key], key) 
         setting.update(value)
     except:
         from askbot.deps.livesettings.models import Setting
         setting = Setting.objects.get(key=key)
         setting.value = value
         setting.save()
Beispiel #2
0
 def update(self, key, value):
     try:
         setting = config_get(self.__group_map[key], key) 
         setting.update(value)
     except:
         from askbot.deps.livesettings.models import Setting
         setting = Setting.objects.get(key=key)
         setting.value = value
         setting.save()
    def update(self, key, value):
        try:
            setting = config_get(self.__group_map[key], key)
            if setting.localized:
                lang = get_language()
            else:
                lang = None
            setting.update(value, lang)

        except:
            from askbot.deps.livesettings.models import Setting
            lang_postfix = '_' + get_language().upper()
            #first try localized setting
            try:
                setting = Setting.objects.get(key=key + lang_postfix)
            except Setting.DoesNotExist:
                setting = Setting.objects.get(key=key)

            setting.value = value
            setting.save()
    def update(self, key, value):
        try:
            setting = config_get(self.__group_map[key], key)
            if setting.localized:
                lang = get_language()
            else:
                lang = None
            setting.update(value, lang)

        except:
            from askbot.deps.livesettings.models import Setting
            lang_postfix = '_' + get_language().upper()
            #first try localized setting
            try:
                setting = Setting.objects.get(key=key + lang_postfix)
            except Setting.DoesNotExist:
                setting = Setting.objects.get(key=key)

            setting.value = value
            setting.save()
 def update(self, key, value):
     setting = config_get(self.__group_map[key], key) 
     setting.update(value)
Beispiel #6
0
 def update(self, key, value):
     setting = config_get(self.__group_map[key], key)
     setting.update(value)