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
49e5cb4c
Commit
49e5cb4c
authored
May 21, 2020
by
liuyingying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加注释
parent
2b6e2ce0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
16 deletions
+9
-16
models.py
hunter/models.py
+3
-1
detail.html
hunter/templates/detail.html
+1
-5
index.html
hunter/templates/index.html
+1
-5
user.html
hunter/templates/user.html
+1
-1
write.html
hunter/templates/write.html
+1
-1
urls.py
hunter/urls.py
+2
-3
view_api.py
hunter/views/view_api.py
+0
-0
view_page.py
hunter/views/view_page.py
+0
-0
No files found.
hunter/models.py
View file @
49e5cb4c
...
...
@@ -49,13 +49,15 @@ class Publications(models.Model):
isOpen
=
models
.
CharField
(
max_length
=
5
,
default
=
'1'
)
editDateTime
=
models
.
DateField
(
default
=
timezone
.
now
)
# *Pubs vs *Users
class
PubToUser
(
models
.
Model
):
pubID
=
models
.
BigIntegerField
()
username
=
models
.
CharField
(
max_length
=
50
)
userID
=
models
.
IntegerField
(
default
=
0
)
#publish=0 用户私有,publish=1 组内可见,publish=2 公开
# publish=0 用户私有,publish=1 组内可见,publish=2 公开
class
Articles
(
models
.
Model
):
articleID
=
models
.
BigIntegerField
(
primary_key
=
True
)
authorID
=
models
.
IntegerField
()
...
...
hunter/templates/detail.html
View file @
49e5cb4c
...
...
@@ -73,10 +73,8 @@
<span>
MY-CVE
</span>
<div
class=
"content"
>
<div
class=
"ul_list"
>
{% for year, cves in cve_year_list.items %}
{% if cves %}
<ul>
{% for cve in cve
s
%}
{% for cve in cve
_list
%}
<li>
<span
><a
href=
"{{ cve.url }}"
target=
"_blank"
>
{{ cve.identifier }}
</a></span>
<span
>
{{ cve.software }}
</span>
...
...
@@ -84,8 +82,6 @@
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
</div>
</div>
...
...
hunter/templates/index.html
View file @
49e5cb4c
...
...
@@ -95,18 +95,14 @@
<span>
{{ it.date }}
</span>
{% if key == 'publication' %}
<span>
{{ it.author }}
在{{ it.journalname }}上发表了{{ it.publishType }}
</span>
<span><a
target=
"_blank"
href=
"{{ it.url }}"
>
《{{ it.title }}》
</a></span>
{% else %}
{% if key == 'cve' %}
<span>
{{ it.author }}
提交了
</span>
<span><a
target=
"_blank"
href=
"{{ it.url }}"
>
{{ it.title }}
</a></span>
{% else %}
<span>
{{ it.author }}
写了文章
</span>
<span><a
target=
"_blank"
href=
"{{ it.url }}"
>
《{{ it.title }}》
</a></span>
{% endif %}
{% endif %}
<span><a
target=
"_blank"
href=
"{{ it.url }}"
>
《{{ it.title }}》
</a></span>
</div>
{% endfor %}
...
...
hunter/templates/user.html
View file @
49e5cb4c
...
...
@@ -144,7 +144,7 @@
<div
class=
"add_one"
>
<button
class=
"add_url"
onclick=
"addArt()"
title=
"添加外部平台文章链接"
></button>
<a
href=
"{% url 'hunter:write_art' %}"
title=
"写文章"
>
<a
href=
"{% url 'hunter:write_art
_html
' %}"
title=
"写文章"
>
<svg
t=
"1587711451871"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2741"
width=
"20"
height=
"20"
><path
d=
"M863.079412 351.09129a29.2569 29.2569 0 0 1 58.5138 0v555.881108a117.027602 117.027602 0 0 1-117.027601 117.027602H219.427602a117.027602 117.027602 0 0 1-117.027602-117.027602V146.292987a117.027602 117.027602 0 0 1 117.027602-117.027602h380.339706a29.2569 29.2569 0 0 1 0 58.513801H219.427602a58.513801 58.513801 0 0 0-58.513801 58.513801v760.679411a58.513801 58.513801 0 0 0 58.513801 58.513801h585.138009a58.513801 58.513801 0 0 0 58.513801-58.513801V351.09129zM855.414104 10.306913a29.2569 29.2569 0 1 1 44.587516 37.916943l-248.683654 292.569005a29.2569 29.2569 0 1 1-44.587516-37.916943l248.683654-292.569005zM307.198303 526.632692h263.312104a29.2569 29.2569 0 0 1 0 58.513801H307.198303a29.2569 29.2569 0 0 1 0-58.513801z m0 175.541403h409.596606a29.2569 29.2569 0 0 1 0 58.513801H307.198303a29.2569 29.2569 0 0 1 0-58.513801z"
p-id=
"2742"
fill=
"#6e829e"
></path></svg>
</a>
</div>
...
...
hunter/templates/write.html
View file @
49e5cb4c
...
...
@@ -123,7 +123,7 @@
formdata
.
append
(
"title"
,
title
);
formdata
.
append
(
"content"
,
content
);
$
.
ajax
({
url
:
'/
writ
e/'
,
url
:
'/
save/articl
e/'
,
type
:
'post'
,
data
:
formdata
,
processData
:
false
,
// 使数据不做处理
...
...
hunter/urls.py
View file @
49e5cb4c
...
...
@@ -17,12 +17,13 @@ urlpatterns = [
path
(
'user/detail/<int:user_id>/'
,
views
.
resume_html
,
name
=
'resume'
),
#新建文章页面
path
(
'write/'
,
views
.
write_art_html
,
name
=
'write_art'
),
path
(
'write/'
,
views
.
write_art_html
,
name
=
'write_art
_html
'
),
#查看文章页面
path
(
'article/<int:article_id>/'
,
views
.
article_html
,
name
=
'article'
),
#编辑文章页面
path
(
'edit/article/<int:article_id>/'
,
views
.
edit_art_html
,
name
=
'edit_art'
),
#api
path
(
'save/article/'
,
views
.
save_article
,
name
=
'save_article'
),
path
(
'save/edit/article/'
,
views
.
save_edit_art
,
name
=
'save_edit_art'
),
path
(
'uploadImg/'
,
views
.
uploadImg
,
name
=
'uploadImg'
),
path
(
'add/article/url/'
,
views
.
add_url_article
,
name
=
'add_url_article'
),
...
...
@@ -39,12 +40,10 @@ urlpatterns = [
path
(
'edit/publication/'
,
views
.
edit_publication
,
name
=
'edit_publication'
),
path
(
'add/cve/'
,
views
.
add_cve
,
name
=
'add_cve'
),
path
(
'edit/cve/'
,
views
.
edit_cve
,
name
=
'edit_cve'
),
path
(
'add/article/'
,
views
.
add_article
,
name
=
'add_article'
),
path
(
'ht/admin/'
,
views
.
admin
,
name
=
'admin'
),
path
(
'operator/'
,
views
.
operator
,
name
=
'operator'
),
path
(
'add_user/'
,
views
.
add_user
,
name
=
'add_user'
),
path
(
'update_article/'
,
views
.
update_article
,
name
=
'update_article'
),
path
(
'add_sub_score/'
,
views
.
add_sub_score
,
name
=
'add_sub_score'
),
path
(
'get_user_scores/'
,
views
.
user_score_records
,
name
=
'get_user_scores'
),
...
...
hunter/views/view_api.py
View file @
49e5cb4c
This diff is collapsed.
Click to expand it.
hunter/views/view_page.py
View file @
49e5cb4c
This diff is collapsed.
Click to expand it.
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