askbot.conf.settings_wrapper

Definition of a Singleton wrapper class for askbot.deps.livesettings with interface similar to django.conf.settings that is each setting has unique key and is accessible via dotted lookup.

for example to lookup value of setting BLAH you would do

from askbot.conf import settings as askbot_settings

askbot_settings.BLAH

NOTE that at the moment there is distinction between settings (django settings) and askbot_settings (forum.deps.livesettings)

the value will be taken from askbot.deps.livesettings database or cache note that during compilation phase database is not accessible for the most part, so actual values are reliably available only at run time

askbot.deps.livesettings is a module developed for satchmo project

class askbot.conf.settings_wrapper.ConfigSettings

Bases: object

A very simple Singleton wrapper for settings a limitation is that all settings names using this class must be distinct, even though they might belong to different settings groups

as_dict()
classmethod prime_cache(**kwargs)

reload all settings into cache as dictionary

register(value)

registers the setting value must be a subclass of askbot.deps.livesettings.Value

update(key, value)

This Page