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
8c93214c
Commit
8c93214c
authored
Apr 22, 2020
by
liuyingying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文章显示问题
parent
ba234433
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
index.html
Hunter_ht/hunter/templates/hunter/index.html
+1
-1
views.py
Hunter_ht/hunter/views.py
+1
-0
No files found.
Hunter_ht/hunter/templates/hunter/index.html
View file @
8c93214c
...
...
@@ -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.author
ID
}}
</li>
<li
class=
"middle_text right"
>
{{ art.editDateTime }}
</li>
</ul>
{% endfor %}
...
...
Hunter_ht/hunter/views.py
View file @
8c93214c
...
...
@@ -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
:
...
...
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