git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing setup.py to reference README instead of README.markdown as otherwise sdist...
[philo.git]
/
philo
/
models
/
base.py
diff --git
a/philo/models/base.py
b/philo/models/base.py
index
86569b7
..
2f798ae
100644
(file)
--- a/
philo/models/base.py
+++ b/
philo/models/base.py
@@
-319,7
+319,12
@@
class Entity(models.Model):
"""
return mapper(self)
"""
return mapper(self)
- attributes = property(get_attribute_mapper)
+
+ @property
+ def attributes(self):
+ if not hasattr(self, '_attributes'):
+ self._attributes = self.get_attribute_mapper()
+ return self._attributes
class Meta:
abstract = True
class Meta:
abstract = True
@@
-500,7
+505,6
@@
class TreeEntity(Entity, MPTTModel):
else:
mapper = AttributeMapper
return super(TreeEntity, self).get_attribute_mapper(mapper)
else:
mapper = AttributeMapper
return super(TreeEntity, self).get_attribute_mapper(mapper)
- attributes = property(get_attribute_mapper)
def __unicode__(self):
return self.path
def __unicode__(self):
return self.path