equal
deleted
inserted
replaced
160 warn('[3.15] self._cw.json_request is deprecated, use self._cw.ajax_request instead', |
160 warn('[3.15] self._cw.json_request is deprecated, use self._cw.ajax_request instead', |
161 DeprecationWarning, stacklevel=2) |
161 DeprecationWarning, stacklevel=2) |
162 self.ajax_request = value |
162 self.ajax_request = value |
163 json_request = property(_get_json_request, _set_json_request) |
163 json_request = property(_get_json_request, _set_json_request) |
164 |
164 |
165 def base_url(self, secure=None): |
165 def _base_url(self, secure=None): |
166 """return the root url of the instance |
166 """return the root url of the instance |
167 |
167 |
168 secure = False -> base-url |
168 secure = False -> base-url |
169 secure = None -> https-url if req.https |
169 secure = None -> https-url if req.https |
170 secure = True -> https if it exist |
170 secure = True -> https if it exist |
173 secure = self.https |
173 secure = self.https |
174 base_url = None |
174 base_url = None |
175 if secure: |
175 if secure: |
176 base_url = self.vreg.config.get('https-url') |
176 base_url = self.vreg.config.get('https-url') |
177 if base_url is None: |
177 if base_url is None: |
178 base_url = super(_CubicWebRequestBase, self).base_url() |
178 base_url = super(_CubicWebRequestBase, self)._base_url() |
179 return base_url |
179 return base_url |
180 |
180 |
181 @property |
181 @property |
182 def authmode(self): |
182 def authmode(self): |
183 """Authentification mode of the instance |
183 """Authentification mode of the instance |