From 69819ff7a55fd1721f8cb6a213feb86c70962ebf Mon Sep 17 00:00:00 2001 From: liangliangyy Date: Sat, 11 Mar 2017 14:55:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DjangoBlog/settings.py | 2 +- blog/static/blog/css/style.css | 3 +++ templates/blog/article_detail.html | 12 +++++++++++- templates/oauth/oauth_applications.html | 9 ++++++--- templates/share_layout/base.html | 2 +- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/DjangoBlog/settings.py b/DjangoBlog/settings.py index 73f0500..37bb161 100644 --- a/DjangoBlog/settings.py +++ b/DjangoBlog/settings.py @@ -26,7 +26,7 @@ DEBUG = True # DEBUG = False # ALLOWED_HOSTS = [] -ALLOWED_HOSTS = ['www.lylinux.net', '127.0.0.1'] +ALLOWED_HOSTS = ['www.lylinux.net', '127.0.0.1','example.com'] # Application definition INSTALLED_APPS = [ diff --git a/blog/static/blog/css/style.css b/blog/static/blog/css/style.css index 406ea31..45b560e 100755 --- a/blog/static/blog/css/style.css +++ b/blog/static/blog/css/style.css @@ -1998,6 +1998,9 @@ div { #wp-auto-top-bottom:hover { background-position: right -68px; } +.widget-login{ + margin-top: 15px!important; +} /* ------------------------------------------------------------------------- * * Comments diff --git a/templates/blog/article_detail.html b/templates/blog/article_detail.html index 653eaa3..65049b2 100755 --- a/templates/blog/article_detail.html +++ b/templates/blog/article_detail.html @@ -45,7 +45,17 @@ {% comment %}{% load comments_tags %} {% load_post_comment article from %}{% endcomment %} {% include 'comments/tags/comment_list.html' %} - {% include 'comments/tags/post_comment.html' %} + {% if user.is_authenticated %} + {% include 'comments/tags/post_comment.html' %} + {% else %} +
+

您还没有登录,请您登录后发表评论。

+ + {% load oauth_tags %} + {% load_oauth_applications %} + +
+ {% endif %} {% endif %} diff --git a/templates/oauth/oauth_applications.html b/templates/oauth/oauth_applications.html index c876343..7b83c8f 100644 --- a/templates/oauth/oauth_applications.html +++ b/templates/oauth/oauth_applications.html @@ -1,7 +1,10 @@ -
+ \ No newline at end of file +
diff --git a/templates/share_layout/base.html b/templates/share_layout/base.html index 3ee1107..05450de 100644 --- a/templates/share_layout/base.html +++ b/templates/share_layout/base.html @@ -17,7 +17,7 @@ {% block header %} {% endblock %} - {% comment %}{% endcomment %} +