<s> import sys <EOL> from django . utils import six <EOL> def proxy ( attr , default ) : <EOL> def wrapper ( self ) : <EOL> from django . conf import settings <EOL> return getattr ( settings , attr , default ) <EOL> wrapper . __name__ = attr <EOL> return property ( wrapper ) <EOL> class AppSettingsMeta ( type ) : <EOL> def __new__ ( mcs , name , bases , attrs ) : <EOL> prefix = name . upper ( ) + '<STR_LIT:_>' <EOL> for attr , value in attrs . items ( ) : <EOL> if not attr . startswith ( '<STR_LIT>' ) : <EOL> attrs [ attr ] = proxy ( prefix + attr , value ) <EOL> abstract = attrs . pop ( '<STR_LIT>' , False ) <EOL> cls = super ( AppSettingsMeta , mcs ) . __new__ ( mcs , name , bases , attrs ) <EOL> if not abstract : <EOL> ins = cls ( ) <EOL> ins . __name__ = ins . __module__ <EOL> sys . modules [ ins . __module__ ] = ins <EOL> return cls <EOL> class AppSettings ( six . with_metaclass ( AppSettingsMeta ) ) : <EOL> __abstract__ = True <EOL> class ControlCenter ( AppSettings ) : <EOL> DASHBOARDS = [ ] <EOL> CHARTIST_COLORS = '<STR_LIT:default>' <EOL> SHARP = '<STR_LIT:#>' </s>
