Home | Trees | Index | Help |
|
---|
Package Pyblosxom :: Module pyblosxom :: Class Request |
|
object
--+
|
Request
This class holds the PyBlosxom request. It holds configuration information, HTTP/CGI information, and data that we calculate and transform over the course of execution.
There should be only one instance of this class floating around and it should get created by pyblosxom.cgi and passed into the PyBlosxom instance which will do further manipulation on the Request instance.Method Summary | |
---|---|
Sets configuration and environment. | |
Sort of simulates the dict except we only have three valid attributes: config, data, and http. | |
Can't copy the __iter__ method over from the StringIO instance cause iter looks for the method in the class instead of the instance. | |
__repr__(self)
| |
Takes in a dict and adds/overrides values in the existing configuration dict with the new values. | |
Takes in a dict and adds/overrides values in the existing data dict with the new values. | |
Takes in a dict and adds/overrides values in the existing http dict with the new values. | |
Buffer the input stream in a StringIO instance. | |
dumpRequest(self)
| |
Returns the _actual_ configuration dict. | |
Returns the _actual_ data dict. | |
Returns the form data submitted by the client. | |
Returns the _actual_ http dict. | |
Returns the Response object which handles all output
related functionality. | |
Sets the Response object. | |
Copies methods from the underlying input stream to the request object. | |
Parses and returns the form data submitted by the client. | |
__populateDict(self,
currdict,
newdict)
| |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Method Details |
---|
__init__(self,
config,
environ,
data)
Sets configuration and environment. Creates the |
__getattr__(self,
name,
default=None)
Sort of simulates the dict except we only have three valid
attributes: config, data, and http.
|
__iter__(self)Can't copy the __iter__ method over from the StringIO instance cause iter looks for the method in the class instead of the instance. So can't do this with __copy_members, have to define it seperatly. See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252151 |
addConfiguration(self, d)Takes in a dict and adds/overrides values in the existing configuration dict with the new values.
|
addData(self, d)Takes in a dict and adds/overrides values in the existing data dict with the new values.
|
addHttp(self, d)Takes in a dict and adds/overrides values in the existing http dict with the new values.
|
buffer_input_stream(self)Buffer the input stream in a StringIO instance. This is done to have a known/consistent way of accessing incomming data. For example the input stream passed by mod_python does not offer the same functionallity as sys.stdin. |
getConfiguration(self)Returns the _actual_ configuration dict. The configuration dict holds values that the user sets in their config.py file. Modifying the contents of the dict will affect all downstream processing.
|
getData(self)Returns the _actual_ data dict. Holds run-time data which is created and transformed by pyblosxom during execution. Modifying the contents of the dict will affect all downstream processing.
|
getForm(self)Returns the form data submitted by the client. Theform
instance is created only when requested to prevent overhead and
unnecessary consumption of the input stream.
|
getHttp(self)Returns the _actual_ http dict. Holds HTTP/CGI data derived from the environment of execution. Modifying the contents of the dict will affect all downstream processing.
|
getResponse(self)Returns theResponse object which handles all output
related functionality.
|
setResponse(self, response)Sets theResponse object.
|
__copy_members(self)Copies methods from the underlying input stream to the request object. |
__getForm(self)Parses and returns the form data submitted by the client. Rewinds the input buffer after calling cgi.FieldStorage.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Tue Feb 7 21:43:58 2006 | http://epydoc.sf.net |