Example #1
0
 def __init__(self):
     Storage.__init__(self)
     self.status = 200
     self.headers = dict()
     self.headers['X-Powered-By'] = 'web2py'
     self.body = StringIO()
     self.session_id = None
     self.cookies = Cookie.SimpleCookie()
     self.postprocessing = []
     self.flash = ''  # used by the default view layout
     self.meta = Storage()  # used by web2py_ajax.html
     self.menu = []  # used by the default view layout
     self.files = []  # used by web2py_ajax.html
     self._vars = None
     self._caller = lambda f: f()
     self._view_environment = None
     self._custom_commit = None
     self._custom_rollback = None
     self.generic_patterns = ['*']
     self.delimiters = ('{{', '}}')
     self.formstyle = 'table3cols'
     self.form_label_separator = ': '
Example #2
0
 def __init__(self, env):
     Storage.__init__(self)
     self.env = Storage(env)
     self.env.web2py_path = global_settings.applications_parent
     self.env.update(global_settings)
     self.cookies = Cookie.SimpleCookie()
     self._get_vars = None
     self._post_vars = None
     self._vars = None
     self._body = None
     self.folder = None
     self.application = None
     self.function = None
     self.args = List()
     self.extension = 'html'
     self.now = datetime.datetime.now()
     self.utcnow = datetime.datetime.utcnow()
     self.is_restful = False
     self.is_https = False
     self.is_local = False
     self.global_settings = settings.global_settings
     self._uuid = None