本文整理匯總了Python中vilya.models.user.User.check_session方法的典型用法代碼示例。如果您正苦於以下問題:Python User.check_session方法的具體用法?Python User.check_session怎麽用?Python User.check_session使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vilya.models.user.User
的用法示例。
在下文中一共展示了User.check_session方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: start_request
# 需要導入模塊: from vilya.models.user import User [as 別名]
# 或者: from vilya.models.user.User import check_session [as 別名]
def start_request(self, request):
Publisher.start_request(self, request)
os.environ['SQLSTORE_SOURCE'] = request.get_url()
resp = request.response
resp.set_content_type('text/html; charset=utf-8')
resp.set_header('Pragma', 'no-cache')
resp.set_header('Cache-Control', 'must-revalidate, no-cache, private')
# FIXME: quixote with origin?
resp.set_header('Access-Control-Allow-Origin', '*')
request.enable_ajax = False
request.browser = request.guess_browser_version()
request.method = request.get_method()
request.url = request.get_path()
request.is_mobile = is_mobile_device(request)
request.start_time = time.time()
request.user = User.check_session(request)
import_obj_set("request", request)