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 @@ -
+
+ + 快捷登录: + {% for icon,url in apps %} - + {% endfor %} -
\ 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 %} +