Show More
@@ -188,18 +188,20 b' class Tag(models.Model):' | |||
|
188 | 188 | |
|
189 | 189 | return reply_count |
|
190 | 190 | |
|
191 | def get_linked_tags(self): | |
|
192 | linked_tags = [] | |
|
191 | def get_linked_tags(self, tag_list=[]): | |
|
192 | """ | |
|
193 | Returns the list of tags linked to current. The list can be got | |
|
194 | through returned value or tag_list parameter | |
|
195 | """ | |
|
193 | 196 | |
|
194 | 197 | linked_tag = self.linked |
|
195 | if linked_tag: | |
|
196 |
|
|
|
198 | ||
|
199 | if linked_tag and not (linked_tag in tag_list): | |
|
200 | tag_list.append(linked_tag) | |
|
197 | 201 | |
|
198 |
|
|
|
199 | if len(far_tags) > 0: | |
|
200 | linked_tags.extend(far_tags) | |
|
202 | linked_tag.get_linked_tags(tag_list) | |
|
201 | 203 | |
|
202 |
return |
|
|
204 | return tag_list | |
|
203 | 205 | |
|
204 | 206 | |
|
205 | 207 | class Post(models.Model): |
General Comments 0
You need to be logged in to leave comments.
Login now