diff -r 38648b051199 -r 3bd9b317b1d8 web/request.py --- a/web/request.py Tue Feb 21 16:53:34 2012 +0100 +++ b/web/request.py Mon Feb 27 11:50:04 2012 +0100 @@ -81,33 +81,46 @@ class CubicWebRequestBase(DBAPIRequest): - """abstract HTTP request, should be extended according to the HTTP backend""" + """abstract HTTP request, should be extended according to the HTTP backend + Immutable attributes that describe the received query and generic configuration + """ ajax_request = False # to be set to True by ajax controllers def __init__(self, vreg, https, form=None): + """ + :vreg: Vregistry, + :https: boolean, s this a https request + :form: Forms value + """ super(CubicWebRequestBase, self).__init__(vreg) + #: (Boolean) Is this an https request. self.https = https + #: User interface property (vary with https) (see uiprops_) + self.uiprops = None + #: url for serving datadir (vary with https) (see resources_) + self.datadir_url = None if https: self.uiprops = vreg.config.https_uiprops self.datadir_url = vreg.config.https_datadir_url else: self.uiprops = vreg.config.uiprops self.datadir_url = vreg.config.datadir_url - # raw html headers that can be added from any view + #: raw html headers that can be added from any view self.html_headers = HTMLHead(self) - # form parameters + #: form parameters self.setup_params(form) - # dictionary that may be used to store request data that has to be - # shared among various components used to publish the request (views, - # controller, application...) + #: dictionary that may be used to store request data that has to be + #: shared among various components used to publish the request (views, + #: controller, application...) self.data = {} - # search state: 'normal' or 'linksearch' (eg searching for an object - # to create a relation with another) + #: search state: 'normal' or 'linksearch' (eg searching for an object + #: to create a relation with another) self.search_state = ('normal',) - # page id, set by htmlheader template + #: page id, set by htmlheader template self.pageid = None self._set_pageid() # prepare output header + #: Header used for the final response self.headers_out = Headers() def _set_pageid(self): @@ -133,8 +146,13 @@ @property def authmode(self): + """Authentification mode of the instance + + (see `Configuring the Web server`_)""" return self.vreg.config['auth-mode'] + # Various variable generator. + @property def varmaker(self): """the rql varmaker is exposed both as a property and as the