equal
deleted
inserted
replaced
96 break |
96 break |
97 |
97 |
98 path.reverse() |
98 path.reverse() |
99 return path |
99 return path |
100 |
100 |
101 def iterparents(self): |
101 def iterparents(self, strict=True): |
102 def _uptoroot(self): |
102 def _uptoroot(self): |
103 curr = self |
103 curr = self |
104 while True: |
104 while True: |
105 curr = curr.parent() |
105 curr = curr.parent() |
106 if curr is None: |
106 if curr is None: |
107 break |
107 break |
108 yield curr |
108 yield curr |
|
109 if not strict: |
|
110 return chain([self], _uptoroot(self)) |
109 return _uptoroot(self) |
111 return _uptoroot(self) |
110 |
112 |
111 def notification_references(self, view): |
113 def notification_references(self, view): |
112 """used to control References field of email send on notification |
114 """used to control References field of email send on notification |
113 for this entity. `view` is the notification view. |
115 for this entity. `view` is the notification view. |