Commit da04b9df by liuyingying

修改文章显示问题

parent 8c93214c
...@@ -55,7 +55,8 @@ def index(request): ...@@ -55,7 +55,8 @@ def index(request):
for art in article_list: for art in article_list:
year = str(art.editDateTime)[0:4] year = str(art.editDateTime)[0:4]
art.editDateTime = str(art.editDateTime)[5:10] art.editDateTime = str(art.editDateTime)[5:10]
art.authorID = User.objects.filter(userID=art.authorID).values('name') u = User.objects.filter(userID=art.authorID).values('name')
art.authorID = u[0]['name']
if year in article_year_list.keys(): if year in article_year_list.keys():
article_year_list[year].append(art) article_year_list[year].append(art)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment