| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
Response
Used to transport response data from a write adapter through the adapter's call stack.
A write adapter returns a Response object for all calls
to its write or delete methods. The write
adapter is responsible for setting the success,
raw, raw_format, status, and
meta attributes on the Response object, but
should perform no additional processing. Middlewares can then use the
response data to modify the model being saved. For example, after a
write, one middleware may refresh the model's attributes, while another
middleware may expire some cache entries for that model. The
parsed, model_attributes, and
errors methods are provided to return the response data in
formats that are easy for middlewares to work with.
| Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
| Class Variables | |
PARSERS =
|
|
| Properties | |
|
Inherited from |
| Method Details |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Returns a format-independent dictionary representation of the raw response data. Both the model_attributes and errors methods transform the result of the parsed method into a form that is meaningful. |
Prevent the parsed method from being replaced. Allows a user to set response.parsed = {...} without replacing the parsed method. This is because the parsed method will parse the contents of the raw attribute and store its value in the _parsed attribute if _parsed has not already been set to some other value. Setting any other attribute still works like normal.
|
| Class Variable Details |
PARSERS
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Thu Jun 30 17:41:50 2011 | http://epydoc.sourceforge.net |