Commit dd8d136f by liuyingying

文章排序

parent 8463fee0
......@@ -144,7 +144,7 @@ def user(request, user_id):
username = usr.name
u = {'userID': user_id, 'name': username}
my_publication_year_list = {}
pub_ids = PubToUser.objects.filter(userID=user_id).all().values("pubID")
pub_ids = PubToUser.objects.filter(userID=user_id).all().values("pubID").order_by('-date')
for pub_id in pub_ids:
print(pub_id)
pub = get_object_or_404(Publications, pk=pub_id['pubID'])
......@@ -169,7 +169,7 @@ def user(request, user_id):
else:
my_article_year_list[year] = [art]
my_bug_list = Bugs.objects.filter(owner=username).order_by('-datetime')
my_bug_list = Bugs.objects.filter(owner=username).order_by('-identifier')
my_cve_year_list = {}
for cve in my_bug_list:
year = str(cve.datetime)[0:4]
......
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