Beispiel #1
0
 def disable(self):
     settings._wrapped = self.wrapped
     del self.wrapped
     for key in self.options:
         new_value = getattr(settings, key, None)
         setting_changed.send(sender=settings._wrapped.__class__,
                              setting=key, value=new_value, enter=False)
Beispiel #2
0
 def enable(self):
     override = UserSettingsHolder(settings._wrapped)
     for key, new_value in self.options.items():
         setattr(override, key, new_value)
     self.wrapped = settings._wrapped
     settings._wrapped = override
     for key, new_value in self.options.items():
         setting_changed.send(sender=settings._wrapped.__class__,
                              setting=key, value=new_value, enter=True)