Skip to content

Commit 99ce48b

Browse files
committed
V1.0
1 parent a3c369e commit 99ce48b

20 files changed

+179
-285
lines changed

.idea/workspace.xml

+132-250
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
1 Byte
Binary file not shown.

Station/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121

122122
USE_L10N = True
123123

124-
USE_TZ = True
124+
USE_TZ = False
125125

126126

127127
# Static files (CSS, JavaScript, Images)
0 Bytes
Binary file not shown.

news/static/news/css/style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ header .adv-content {
646646

647647

648648
.list3 {
649-
padding-bottom:24px;
649+
padding-bottom:20px;
650650
}
651651
.list3 li {
652652
background: url(../images/arrow2.gif) no-repeat 0 7px;
Binary file not shown.

news/templatetags/news_tags.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from django.db.models.aggregates import Count
66
from ..models import Post, Category, Tag
77
from django import template
8+
from django.utils import timezone
9+
from datetime import datetime, date
810

911
register = template.Library()
1012

@@ -34,4 +36,13 @@ def get_popular_post(num=9):
3436
def get_more_popular_post():
3537
return Post.objects.all().order_by('-views')
3638

37-
39+
@register.simple_tag()
40+
def get_now_day_hot():
41+
t = timezone.now()
42+
43+
# ,
44+
# created_time__month = t.month,
45+
# created_time__day = t.day
46+
return Post.objects.filter(created_time__year=t.year,
47+
created_time__month=t.month,
48+
).order_by('-views')

readme.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ V0.8
77

88
v0.85 ��V0.8�Ļ���������������ϵͳ���������۱�������ʽ̫�ѿ�
99

10-
V0.95 �����������б����棬�Ż��˸�������ϸ�ڣ������µķ���ͼƬ���˴��������ڽ�ʣ���������û���޸ĵײ���ʽ��û��¼�����ţ���
10+
V0.95 �����������б����棬�Ż��˸�������ϸ�ڣ������µķ���ͼƬ���˴��������ڽ�ʣ���������û���޸ĵײ���ʽ��û��¼�����ţ���
11+
12+
V1.0 ���������ŵķ��棬�޸��˵ײ���ʽ

templates/base.html

+12-24
Original file line numberDiff line numberDiff line change
@@ -61,35 +61,23 @@ <h1><a><strong>新闻</strong>系统</a></h1>
6161
<div class="container">
6262
<div class="wrapper">
6363
<div class="grid3 first">
64-
<h3>Database</h3>
64+
<h3>友情链接</h3>
6565
<ul class="list1">
66-
<li><a href="#">Real Application Clusters</a></li>
67-
<li><a href="#">Database Security</a></li>
68-
<li><a href="#">Secure Enterprise Search</a></li>
69-
</ul>
70-
</div>
71-
<div class="grid3">
72-
<h3>Quick Links</h3>
73-
<ul class="list2">
74-
<li><a href="#">Certification</a></li>
75-
<li><a href="#">Education</a></li>
76-
<li><a href="#">Careers</a></li>
77-
<li><a href="#">For Midsize Companies</a></li>
78-
<li><a href="#">Investors</a></li>
79-
<li><a href="#">Technology Network</a></li>
80-
<li><a href="#">FAQs</a></li>
66+
<li><a href="http://www.cctv.com/">央视网</a></li>
67+
<li><a href="http://www.china.com.cn/">中国网</a></li>
68+
<li><a href="http://news.sina.com.cn/">新浪新闻</a></li>
69+
<li><a href="http://news.qq.com/">腾讯新闻</a></li>
70+
<li><a href="https://news.hao123.com/">hao123</a></li>
71+
<li><a href="http://news.baidu.com/">百度新闻</a></li>
72+
<li><a href="https://www.thepaper.cn/">澎湃新闻</a></li>
8173
</ul>
8274
</div>
75+
8376
<div class="grid3">
84-
<h3>Top Downloads</h3>
77+
<h3>备案信息</h3>
8578
<ul class="list2">
86-
<li><a href="#">Enterprise Architecture</a></li>
87-
<li><a href="#">Enterprise 2.0</a></li>
88-
<li><a href="#">Grid</a></li>
89-
<li><a href="#">Service-Oriented Architecture</a></li>
90-
<li><a href="#">Virtualization</a></li>
91-
<li><a href="#">Database XE</a></li>
92-
<li><a href="#">Enterprise Management</a></li>
79+
<li><a href="http://www.miitbeian.gov.cn">陕ICP备17022211号-2</a></li>
80+
9381
</ul>
9482
</div>
9583
<div class="grid3">

templates/news/category_detail.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ <h2>热点摘要</h2>
7979
<div class="grid9">
8080
<h2>热门新闻</h2>
8181
<div class="clearfix">
82-
<div class="grid3">
82+
<div class="grid3 first">
8383
<ul class="list3">
8484
{% for post in popular_post_list %}
8585
{% if forloop.counter <= 3 %}
@@ -111,6 +111,7 @@ <h2>热门新闻</h2>
111111
</ul>
112112
</div>
113113

114+
114115
</div>
115116
<p>&nbsp;</p>
116117

templates/news/index.html

+14-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,20 @@
2222
<section id="intro">
2323
<div class="inner">
2424
<h2>看世界</h2>
25-
<h2><span>今日热点</span></h2>
26-
<p>习近平和母亲<br />
27-
在习近平总书记的书架上,摆着这样一张照片。记录下了习近平陪伴母亲散步的温馨时刻,习近平拉着母亲齐心的手,漫步在公园中。
28-
孝敬父母、重视亲情,习近平有着深厚的家庭情怀。</p>
29-
<a href="#" class="extra-button">阅读详情</a>
25+
<h2><span>本月热点</span></h2>
26+
{% get_now_day_hot as post_list %}
27+
{% for post in post_list %}
28+
29+
{% if forloop.first %}
30+
<p>{{ post.title }}<br />
31+
{{ post.excerpt }}</p>
32+
<a href="{{ post.get_absolute_url }}" class="extra-button">阅读详情</a>
33+
{% endif %}
34+
{% empty %}
35+
本月暂未发布新闻
36+
{% endfor %}
37+
38+
3039
</div>
3140
</section>
3241
</div>

templates/news/post_detail.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ <h2>{{ post.title }}</h2>
3131
{{ form.text }}
3232
{{ form.text.errors }}
3333
<br>
34-
<button type="submit">发表</button>
34+
35+
<button type="submit" class="">发表</button>
3536

3637
</div>
3738
</div> <!-- row -->
-24.3 KB
Binary file not shown.
-8.95 KB
Binary file not shown.
79.5 KB
Binary file not shown.
19.9 KB
Binary file not shown.
-10.3 KB
Binary file not shown.
14.7 KB
Binary file not shown.

whoosh_index/_MAIN_158.toc

-2.28 KB
Binary file not shown.

whoosh_index/_MAIN_203.toc

2.27 KB
Binary file not shown.

0 commit comments

Comments
 (0)