diff --git a/DjangoBlog/settings.py b/DjangoBlog/settings.py index b0cbb3f..2fcad23 100644 --- a/DjangoBlog/settings.py +++ b/DjangoBlog/settings.py @@ -164,7 +164,7 @@ SITE_NAME = '且听风吟' SITE_URL = 'http://www.lylinux.net' SITE_DESCRIPTION = '大巧无工,重剑无锋.' SITE_SEO_DESCRIPTION = '小站主要用来分享和记录学习经验,教程,记录个人生活的点滴以及一些随笔.欢迎大家访问小站' -SITE_SEO_KEYWORDS = 'linux,apache,mysql,服务器,ubuntu,shell,web,csharp,.net,asp,mac,swift' +SITE_SEO_KEYWORDS = 'linux,apache,mysql,服务器,ubuntu,shell,web,csharp,.net,asp,mac,swift,python,django' ARTICLE_SUB_LENGTH = 300 SHOW_GOOGLE_ADSENSE = False # bootstrap颜色样式 @@ -186,10 +186,12 @@ CACHE_CONTROL_MAX_AGE = 2592000 CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'TIMEOUT': 10800, 'LOCATION': '127.0.0.1:11211', }, 'locmemcache': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + 'TIMEOUT': 10800, 'LOCATION': 'unique-snowflake', } } diff --git a/oauth/views.py b/oauth/views.py index 58b96df..f3e8a9e 100644 --- a/oauth/views.py +++ b/oauth/views.py @@ -53,7 +53,7 @@ def authorize(request): if user: if not user.nikename: import datetime - user.nikename = "djangoblog" + datetime.datetime.now().strftime('%Y%m%f%H%m%s') + user.nikename = "djangoblog" + datetime.datetime.now().strftime('%y%m%d%I') try: token = user.token user = OAuthUser.objects.get(type=type, openid=user.openid) diff --git a/templates/blog/tags/sidebar.html b/templates/blog/tags/sidebar.html index fd80be9..f262582 100755 --- a/templates/blog/tags/sidebar.html +++ b/templates/blog/tags/sidebar.html @@ -41,8 +41,7 @@ {% for c in sidebar_comments %}