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 %} + +