equal
deleted
inserted
replaced
82 """abstract HTTP request, should be extended according to the HTTP backend""" |
82 """abstract HTTP request, should be extended according to the HTTP backend""" |
83 json_request = False # to be set to True by json controllers |
83 json_request = False # to be set to True by json controllers |
84 |
84 |
85 def __init__(self, vreg, https, form=None): |
85 def __init__(self, vreg, https, form=None): |
86 super(CubicWebRequestBase, self).__init__(vreg) |
86 super(CubicWebRequestBase, self).__init__(vreg) |
87 self.authmode = vreg.config['auth-mode'] |
|
88 self.https = https |
87 self.https = https |
89 if https: |
88 if https: |
90 self.uiprops = vreg.config.https_uiprops |
89 self.uiprops = vreg.config.https_uiprops |
91 self.datadir_url = vreg.config.https_datadir_url |
90 self.datadir_url = vreg.config.https_datadir_url |
92 else: |
91 else: |
119 pid = make_uid(id(self)) |
118 pid = make_uid(id(self)) |
120 self.pageid = pid |
119 self.pageid = pid |
121 self.html_headers.define_var('pageid', pid, override=False) |
120 self.html_headers.define_var('pageid', pid, override=False) |
122 |
121 |
123 @property |
122 @property |
|
123 def authmode(self): |
|
124 return self.vreg.config['auth-mode'] |
|
125 |
|
126 @property |
124 def varmaker(self): |
127 def varmaker(self): |
125 """the rql varmaker is exposed both as a property and as the |
128 """the rql varmaker is exposed both as a property and as the |
126 set_varmaker function since we've two use cases: |
129 set_varmaker function since we've two use cases: |
127 |
130 |
128 * accessing the req.varmaker property to get a new variable name |
131 * accessing the req.varmaker property to get a new variable name |