Fixed _redis_name and _redis_key

This commit is contained in:
Justin Santa Barbara 2010-07-16 22:37:28 +00:00 committed by Tarmac
commit 3b6910c5ae

View File

@ -103,7 +103,7 @@ class BasicModel(object):
@classmethod
def _redis_name(cls):
return self.override_type or cls.__name__
return cls.override_type or cls.__name__
@classmethod
def lookup(cls, identifier):
@ -145,7 +145,7 @@ class BasicModel(object):
@property
def __redis_key(self):
return '%s:%s' % (self.__class__.__name__.lower(), self.identifier)
return '%s:%s' % (self._redis_name(), self.identifier)
def __repr__(self):
return "<%s:%s>" % (self.__class__.__name__, self.identifier)