Skip to content

Commit

Permalink
Merge pull request #45 from liangliangyy/dev
Browse files Browse the repository at this point in the history
删掉无用输出,增加文章标签长度判断,Fix #44
  • Loading branch information
liangliangyy committed Nov 11, 2017
2 parents 2a7a96d + 521486d commit 062ad09
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion blog/templatetags/blog_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion oauth/oauthmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def get_access_token_by_code(self, code):
'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'])
Expand Down
1 change: 0 additions & 1 deletion oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 062ad09

Please sign in to comment.