删掉无用输出,增加文章标签长度判断,Fix #44

sh_branch
liangliang 8 years ago
parent b8e54d131b
commit 521486d405

@ -133,7 +133,7 @@ def load_sidebar(user):
increment = 5
tags = Tag.objects.all()
sidebar_tags = None
if tags:
if tags and len(tags) > 0:
s = list(map(lambda t: (t, t.get_article_count()), tags))
count = sum(map(lambda t: t[1], s))
dd = count / len(tags)

@ -96,7 +96,6 @@ class WBOauthManager(BaseOauthManager):
'redirect_uri': self.callback_url
}
rsp = self.do_post(self.TOKEN_URL, params)
print(rsp)
try:
obj = json.loads(rsp)
self.access_token = str(obj['access_token'])

@ -26,7 +26,6 @@ def oauthlogin(request):
if not manager:
return HttpResponseRedirect('/')
nexturl = request.GET.get('next_url', None)
print(nexturl)
if not nexturl or nexturl == '/login/':
nexturl = '/'
authorizeurl = manager.get_authorization_url(nexturl)

Loading…
Cancel
Save