git.ithinksw.org
/
philo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0fe338c
)
Added get_path fallback to slug to increase information flow by reducing the number...
author
melinath
<stephen.r.burrows@gmail.com>
Fri, 18 Jun 2010 15:21:42 +0000
(11:21 -0400)
committer
melinath
<stephen.r.burrows@gmail.com>
Fri, 18 Jun 2010 15:21:42 +0000
(11:21 -0400)
models.py
patch
|
blob
|
history
diff --git
a/models.py
b/models.py
index
265df32
..
b66c4c3
100644
(file)
--- a/
models.py
+++ b/
models.py
@@
-220,10
+220,10
@@
class InheritableTreeEntity(TreeEntity):
return None
def get_path(self, pathsep='/', field='slug'):
return None
def get_path(self, pathsep='/', field='slug'):
- path = getattr(self.instance, field,
'?'
)
+ path = getattr(self.instance, field,
getattr(self.instance, 'slug', '?')
)
parent = self.parent
while parent:
parent = self.parent
while parent:
- path = getattr(parent.instance, field,
'?'
) + pathsep + path
+ path = getattr(parent.instance, field,
getattr(parent.instance, 'slug', '?')
) + pathsep + path
parent = parent.parent
return path
path = property(get_path)
parent = parent.parent
return path
path = property(get_path)