add feature
|
@ -0,0 +1,16 @@
|
|||
.title {
|
||||
line-height: 1.42857;
|
||||
}
|
||||
|
||||
.source {
|
||||
color: rgba(0, 0, 0, 0.35)
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.content p {
|
||||
text-indent: 2em;
|
||||
line-height: 1.4;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
||||
<link rel="icon" href="{% static 'favicon.ico' %}">
|
||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{% static 'css/ie10-viewport-bug-workaround.css' %}" rel="stylesheet">
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{% static 'polls/css/news_detail.css' %}" rel="stylesheet">
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-container">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<script src="{% static 'js/jquery-1.11.2.min.js' %}"></script>
|
||||
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
{% extends 'polls/base.html' %}
|
||||
{% block content%}
|
||||
<div class="col-xs-12">
|
||||
<h4 class="title">如何理解伟大抗疫精神,听习近平总书记这样阐释</h4>
|
||||
<div class="source">
|
||||
来源:中瓣网
|
||||
<span class="pull-right date">时间:2020-09-20 14:25:53</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="content">
|
||||
<p>
|
||||
同困难作斗争,是物质的角力,也是精神的对垒。在抗击新冠肺炎疫情的斗争中,是什么精神力量支撑着我们,创造了人类同疾病斗争史上的英勇壮举?
|
||||
</p>
|
||||
<img src="http://cms-bucket.ws.126.net/2020/0909/2dcc71f3p00qge4xk008zc000go00toc.png" style="width:100%;height:400px;">
|
||||
<p>
|
||||
生命至上、举国同心、舍生忘死、尊重科学、命运与共——今日,在全国抗击新冠肺炎疫情表彰大会上,习近平总书记生动论述伟大抗疫精神。
|
||||
</p>
|
||||
<p>
|
||||
人无精神则不立,国无精神则不强。唯有精神上站得住、站得稳,一个民族才能在历史洪流中屹立不倒、挺立潮头。什么是伟大抗疫精神?中华民族能够经历无数灾厄仍不断发展壮大的原因是什么?
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock%}
|
|
@ -15,5 +15,6 @@ urlpatterns = [
|
|||
path('notices/list/', views.notices, name='polls_notices'),
|
||||
path('notices/read/', views.read_notice, name='polls_read_notice'),
|
||||
path('medias/create/', views.create_media, name='polls_add_media'),
|
||||
path('medias/list/', views.medias, name='polls_medias')
|
||||
path('medias/list/', views.medias, name='polls_medias'),
|
||||
path('news/detail/', views.news_detail, name='polls_news_detail'),
|
||||
]
|
||||
|
|
|
@ -24,7 +24,6 @@ def sent_sms_code(phone, code):
|
|||
request.add_query_param('SignName', "短信验证")
|
||||
request.add_query_param('TemplateCode', "SMS_12330409")
|
||||
request.add_query_param('TemplateParam', '{"number":"%s"}' % (code,))
|
||||
|
||||
response = client.do_action(request)
|
||||
return response
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from .user import index, status_500, status_401, polls_login, send_code, register_step_one, register_step_two, password_recover_step_one, password_recover_step_two
|
||||
from .notice import notices, read_notice
|
||||
from .media import medias, create_media
|
||||
from .news import news_detail
|
|
@ -0,0 +1,4 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
def news_detail(request):
|
||||
return render(request, 'polls/news_detail.html')
|
|
@ -75,6 +75,7 @@ def send_code(request):
|
|||
after_1min = now + datetime.timedelta(minutes=1)
|
||||
response = sent_sms_code(phone, code)
|
||||
result = response.decode('utf8')
|
||||
print(result)
|
||||
if "OK" in result:
|
||||
VerifyCode.objects.create(
|
||||
code=code, phone=phone, category=category, timeouted=after_1min)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/*!
|
||||
* IE10 viewport hack for Surface/desktop Windows 8 bug
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*
|
||||
* See the Getting Started docs for more information:
|
||||
* http://getbootstrap.com/getting-started/#support-ie10-width
|
||||
*/
|
||||
@-ms-viewport { width: device-width; }
|
||||
@-o-viewport { width: device-width; }
|
||||
@viewport { width: device-width; }
|
After Width: | Height: | Size: 158 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.3 KiB |