示例#1
0
        def login():
            self.default_return_to = gourl()
            redirector = self.mwoauth.authorize()

            if 'next' in request.args:
                oauth_token = session[self.mwoauth.name + '_oauthtok'][0]
                session[oauth_token + '_target'] = request.args['next']
            redirector.headers['Location'] += "&oauth_consumer_key=" + self.mwoauth.consumer_key
            return redirector
示例#2
0
        def login():
            self.default_return_to = gourl()
            redirector = self.mwoauth.authorize()

            if 'next' in request.args:
                oauth_token = session[self.mwoauth.name + '_oauthtok'][0]
                session[oauth_token + '_target'] = request.args['next']
            redirector.headers[
                'Location'] += "&oauth_consumer_key=" + self.mwoauth.consumer_key
            return redirector
示例#3
0
def error404(e):
    return render('errors/404.html', url=gourl())
示例#4
0
 def logout():
     session['mwo_token'] = None
     session['username'] = None
     return redirect(gourl())
示例#5
0
文件: error.py 项目: nullzero/wpcgi
def error404(e):
    return render("errors/404.html", url=gourl())
示例#6
0
 def logout():
     session['mwo_token'] = None
     session['username'] = None
     return redirect(gourl())