Commit 49e5cb4c by liuyingying

添加注释

parent 2b6e2ce0
...@@ -49,13 +49,15 @@ class Publications(models.Model): ...@@ -49,13 +49,15 @@ class Publications(models.Model):
isOpen = models.CharField(max_length=5, default='1') isOpen = models.CharField(max_length=5, default='1')
editDateTime = models.DateField(default=timezone.now) editDateTime = models.DateField(default=timezone.now)
# *Pubs vs *Users # *Pubs vs *Users
class PubToUser(models.Model): class PubToUser(models.Model):
pubID = models.BigIntegerField() pubID = models.BigIntegerField()
username = models.CharField(max_length=50) username = models.CharField(max_length=50)
userID = models.IntegerField(default=0) userID = models.IntegerField(default=0)
#publish=0 用户私有,publish=1 组内可见,publish=2 公开
# publish=0 用户私有,publish=1 组内可见,publish=2 公开
class Articles(models.Model): class Articles(models.Model):
articleID = models.BigIntegerField(primary_key=True) articleID = models.BigIntegerField(primary_key=True)
authorID = models.IntegerField() authorID = models.IntegerField()
......
...@@ -73,10 +73,8 @@ ...@@ -73,10 +73,8 @@
<span>MY-CVE</span> <span>MY-CVE</span>
<div class="content"> <div class="content">
<div class="ul_list"> <div class="ul_list">
{% for year, cves in cve_year_list.items %}
{% if cves %}
<ul> <ul>
{% for cve in cves %} {% for cve in cve_list %}
<li> <li>
<span ><a href="{{ cve.url }}" target="_blank">{{ cve.identifier }}</a></span> <span ><a href="{{ cve.url }}" target="_blank">{{ cve.identifier }}</a></span>
<span >{{ cve.software }}</span> <span >{{ cve.software }}</span>
...@@ -84,8 +82,6 @@ ...@@ -84,8 +82,6 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %}
{% endfor %}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -95,18 +95,14 @@ ...@@ -95,18 +95,14 @@
<span>{{ it.date }}</span> <span>{{ it.date }}</span>
{% if key == 'publication' %} {% if key == 'publication' %}
<span>{{ it.author }}&nbsp;在{{ it.journalname }}上发表了{{ it.publishType }}</span> <span>{{ it.author }}&nbsp;在{{ it.journalname }}上发表了{{ it.publishType }}</span>
<span><a target="_blank" href="{{ it.url }}">《{{ it.title }}》</a></span>
{% else %} {% else %}
{% if key == 'cve' %} {% if key == 'cve' %}
<span>{{ it.author }}&nbsp;提交了&nbsp;</span> <span>{{ it.author }}&nbsp;提交了&nbsp;</span>
<span><a target="_blank" href="{{ it.url }}">{{ it.title }}</a></span>
{% else %} {% else %}
<span>{{ it.author }}&nbsp;写了文章</span> <span>{{ it.author }}&nbsp;写了文章</span>
<span><a target="_blank" href="{{ it.url }}">《{{ it.title }}》</a></span>
{% endif %} {% endif %}
{% endif %} {% endif %}
<span><a target="_blank" href="{{ it.url }}">《{{ it.title }}》</a></span>
</div> </div>
{% endfor %} {% endfor %}
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<div class="add_one"> <div class="add_one">
<button class="add_url" onclick="addArt()" title="添加外部平台文章链接"></button> <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> <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> </a>
</div> </div>
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
formdata.append("title",title); formdata.append("title",title);
formdata.append("content",content); formdata.append("content",content);
$.ajax({ $.ajax({
url:'/write/', url:'/save/article/',
type:'post', type:'post',
data:formdata, data:formdata,
processData : false, // 使数据不做处理 processData : false, // 使数据不做处理
......
...@@ -17,12 +17,13 @@ urlpatterns = [ ...@@ -17,12 +17,13 @@ urlpatterns = [
path('user/detail/<int:user_id>/', views.resume_html, name='resume'), 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('article/<int:article_id>/', views.article_html, name='article'),
#编辑文章页面 #编辑文章页面
path('edit/article/<int:article_id>/', views.edit_art_html, name='edit_art'), path('edit/article/<int:article_id>/', views.edit_art_html, name='edit_art'),
#api #api
path('save/article/', views.save_article, name='save_article'),
path('save/edit/article/', views.save_edit_art, name='save_edit_art'), path('save/edit/article/', views.save_edit_art, name='save_edit_art'),
path('uploadImg/', views.uploadImg, name='uploadImg'), path('uploadImg/', views.uploadImg, name='uploadImg'),
path('add/article/url/', views.add_url_article, name='add_url_article'), path('add/article/url/', views.add_url_article, name='add_url_article'),
...@@ -39,12 +40,10 @@ urlpatterns = [ ...@@ -39,12 +40,10 @@ urlpatterns = [
path('edit/publication/', views.edit_publication, name='edit_publication'), path('edit/publication/', views.edit_publication, name='edit_publication'),
path('add/cve/', views.add_cve, name='add_cve'), path('add/cve/', views.add_cve, name='add_cve'),
path('edit/cve/', views.edit_cve, name='edit_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('ht/admin/', views.admin, name='admin'),
path('operator/', views.operator, name='operator'), 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('update_article/', views.update_article, name='update_article'),
path('add_sub_score/', views.add_sub_score, name='add_sub_score'), path('add_sub_score/', views.add_sub_score, name='add_sub_score'),
path('get_user_scores/', views.user_score_records, name='get_user_scores'), path('get_user_scores/', views.user_score_records, name='get_user_scores'),
......
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