Ejemplo n.º 1
0
 def get(self, request):
     '''Get the form'''
     user = request.cache.session.user
     if user.is_authenticated():
         yield smart_redirect(request)
     form = self.LoginForm(request)
     html = yield form.layout(request, action=request.full_path())
     response = yield html.http_response(request)
     coroutine_return(response)
Ejemplo n.º 2
0
 def get(self, request):
     """Get the form"""
     user = request.cache.session.user
     if user.is_authenticated():
         yield smart_redirect(request)
     form = self.LoginForm(request)
     html = yield form.layout(request, action=request.full_path())
     response = yield html.http_response(request)
     coroutine_return(response)
Ejemplo n.º 3
0
 def post(self, request):
     yield request.app.permissions.logout(request)
     url = request.url_data.get('redirect', '/')
     coroutine_return(smart_redirect(request, url))
Ejemplo n.º 4
0
 def post(self, request):
     yield request.app.permissions.logout(request)
     url = request.url_data.get("redirect", "/")
     coroutine_return(smart_redirect(request, url))