Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hunter-ht.cn
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘莹莹
hunter-ht.cn
Commits
ff3668d3
Commit
ff3668d3
authored
Jun 05, 2020
by
liuyingying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改读取最新动态的方式
parent
244a9cb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
view_page.py
hunter/views/view_page.py
+8
-0
No files found.
hunter/views/view_page.py
View file @
ff3668d3
...
...
@@ -103,6 +103,14 @@ def index_html(request):
cve
.
author
=
cve
.
owner
cve
.
date
=
str
(
cve
.
datetime
)[
5
:
10
]
# 读取最新论文4篇;文章2篇;CVE2条
if
newest_publication
.
count
()
<
1
:
newest_publication
=
Publications
.
objects
.
all
()
.
order_by
(
'-editDateTime'
)[:
4
]
if
newest_article
.
count
()
<
1
:
newest_article
=
Articles
.
objects
.
all
()
.
order_by
(
'-editDateTime'
)[:
2
]
if
newest_cve
.
count
()
<
1
:
newest_cve
=
Bugs
.
objects
.
all
()
.
order_by
(
'-datetime'
)[:
2
]
newest_post_list
[
'publication'
]
=
newest_publication
newest_post_list
[
'article'
]
=
newest_article
newest_post_list
[
'cve'
]
=
newest_cve
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment