Пример #1
0
 def _setter(self, value):
     redis_key = gen_property_key(self.__class__, self.idx, key)
     get_redis().set(redis_key, _dumps(value))
Пример #2
0
def gen_backref_key(cls, property_name, value):
    return '%s:%s:%s:%d' % ('.'.join([cls.__module__, cls.__name__]),
            property_name, _dumps(value), hash(cls))