def cursor(self):
cursor = self.get_argument('cursor', None)
if cursor:
try:
cursor = int(cursor)
except ValueError:
self.redirect(self.request.path, permanent=True)
raise Finish()
if cursor < 0:
raise HTTPError(404)
else:
cursor = None
return cursor
评论列表
文章目录