class SettingObject(object):

    def __init__(self, initial=None):
        self.__dict__['_data'] = {}
if initial:
    self.update(initial)

def __getattr__(self, name):
    return self._data.get(name, None)

def __setattr__(self, name, value):
    self.__dict__['_data'][name] = value

def update(self, other):
    for k in other:
        self.__setattr__(k, other[k])

def to_dict(self):
    return self._data
Creating a tastypie resource for a "singleton" non-model object