update tag links
This commit is contained in:
@@ -234,6 +234,23 @@ class Post(models.Model):
|
||||
def tag_string(self):
|
||||
return self.get_tags()
|
||||
|
||||
@property
|
||||
def three_tag_names(self):
|
||||
tag_lst = []
|
||||
count = 0
|
||||
|
||||
for t in self.tags.names():
|
||||
tag_lst.append(t)
|
||||
count += 1
|
||||
if count > 2:
|
||||
break
|
||||
|
||||
return tag_lst
|
||||
|
||||
@property
|
||||
def tag_names(self):
|
||||
return [t for t in self.tags.names()]
|
||||
|
||||
@property
|
||||
def imageurl(self):
|
||||
"""
|
||||
|
||||
@@ -135,6 +135,7 @@ def tags(request, tag=""):
|
||||
"featured_post": featured_post,
|
||||
"job_members": job_members,
|
||||
"tags_list": None,
|
||||
"tag": tag,
|
||||
}
|
||||
|
||||
return render(request, "posts/tag.html", context)
|
||||
|
||||
Reference in New Issue
Block a user