Пример #1
0
 def __init__(self, app, charset=None, status="401 Unauthorized", **p):
     AuthFormHandler.__init__(self, app, **p)
     self.status = status
     if charset is None:
         self.charset = ''
     else:
         self.charset = '; charset=' + charset
Пример #2
0
 def __init__(self, app, check_password, **kwargs):
     global config
     AuthFormHandler.__init__(
         self,
         app,
         check_password,
         template=get_login_form()
     )
     WSGIApplication.__init__(self, config)
     self.logout_path = kwargs.pop('logout_path', 'logout')
Пример #3
0
 def __init__(
     self, 
     app,
     charset=None,
     status="200 OK",
     method='post',
     **p
 ):
     AuthFormHandler.__init__(self, app, **p)
     self.status = status
     self.content_type = 'text/html'
     self.charset = charset
     if self.charset is not None:
         self.content_type = self.content_type + '; charset='+charset
     self.method = method
Пример #4
0
 def __init__(self,
              app,
              charset=None,
              status="200 OK",
              method='post',
              action=None,
              user_data=None,
              **p):
     AuthFormHandler.__init__(self, app, **p)
     self.status = status
     self.content_type = 'text/html'
     self.charset = charset
     if self.charset is not None:
         self.content_type = self.content_type + '; charset=' + charset
     self.method = method
     self.action = action
     self.user_data = user_data