Commit 8c93214c by liuyingying

修改文章显示问题

parent ba234433
......@@ -180,7 +180,7 @@
<a href="{% url 'hunter:article' art.articleID %}" target="_blank">{{ art.title }}</a>
</li>
<li>{{ art.author }}</li>
<li class="small_text">{{ art.author }}</li>
<li class="small_text">{{ art.authorID }}</li>
<li class="middle_text right">{{ art.editDateTime }}</li>
</ul>
{% endfor %}
......
......@@ -55,6 +55,7 @@ def index(request):
for art in article_list:
year = str(art.editDateTime)[0:4]
art.editDateTime = str(art.editDateTime)[5:10]
art.authorID = User.objects.filter(userID=art.authorID).values('name')
if year in article_year_list.keys():
article_year_list[year].append(art)
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