diff --git a/article/__pycache__/models.cpython-36.pyc b/article/__pycache__/models.cpython-36.pyc index f95925a..dd15828 100644 Binary files a/article/__pycache__/models.cpython-36.pyc and b/article/__pycache__/models.cpython-36.pyc differ diff --git a/article/models.py b/article/models.py index c70247b..ed98dbb 100644 --- a/article/models.py +++ b/article/models.py @@ -35,6 +35,7 @@ class Article(models.Model): tag = models.CharField(max_length=128, blank=True, null=True) visible = models.CharField(choices=(('Y','是'),('N','否')),max_length=64,default='N') readtime = models.IntegerField(default=0) + #comment_count = models.IntegerField(default=0) #def set_tags(self, tags): # Tag.objects.update_tags(self, tags) diff --git a/article/templates/article/detail.html b/article/templates/article/detail.html index 64b5055..74e50f3 100644 --- a/article/templates/article/detail.html +++ b/article/templates/article/detail.html @@ -35,7 +35,7 @@
{% if title %}{{title}}{% endif %}
{% block sidebar %}- + {{user.user}} - +
{{user.point}} {% ifnotequal user.msg 0 %} - + {% else %} - + {% endifnotequal %} {{user.msg}}
-{% if title %}{{title}}{% endif %}
{{i.title}}
-{{i.detail|striptags|truncatechars:140|safe}}
+{{i.title}}
+{{i.detail|striptags|truncatechars:500|safe}}
{{i.publish_time}} - {{i.author}} + {{i.author}} + + {{i.section}} + + {{i.tag}} 阅读全文 diff --git a/userpage/__pycache__/urls.cpython-36.pyc b/userpage/__pycache__/urls.cpython-36.pyc index 1dcea9e..c0a37bb 100644 Binary files a/userpage/__pycache__/urls.cpython-36.pyc and b/userpage/__pycache__/urls.cpython-36.pyc differ diff --git a/userpage/__pycache__/views.cpython-36.pyc b/userpage/__pycache__/views.cpython-36.pyc index d821e8f..2b42b88 100644 Binary files a/userpage/__pycache__/views.cpython-36.pyc and b/userpage/__pycache__/views.cpython-36.pyc differ diff --git a/userpage/templates/userpage/profile.html b/userpage/templates/userpage/profile.html index 301c43c..83aee1c 100644 --- a/userpage/templates/userpage/profile.html +++ b/userpage/templates/userpage/profile.html @@ -4,38 +4,80 @@+ + {{member.username}} + +
++ + {{member.profile.point}} + + {% ifequal member.id user.id %} + {% ifnotequal user.msg 0 %} + + {% else %} + + {% endifnotequal %} + {{user.msg}} + + {% endifequal %} +
+本站第 {{member.id}} 位会员,于 {{member.date_joined}} 注册,最近一次登录于 {{member.last_login}}. +
+- 文章列表{{arts|length}}
+ - 评论列表{{comments|length}}
+ {% ifequal member.id user.id %}
+ - 编辑资料
+ {% endifequal %}
+
+ {% for i in arts %} +{{i.title}}
+{{i.detail|striptags|truncatechars:500|safe}}
+ + {{i.publish_time}} + + {{i.author}} + + {{i.section}} + + {{i.tag}} + + 查看全文 + +于 {{i.comment_time}} 评论了 {{i.article.author_id}} 的文章【 {{i.article}} 】 +
{{i.comment|safe|escape}}
+