Package omeroweb :: Module decorators :: Class render_response
[hide private]
[frames] | no frames]

Class render_response

source code



This decorator handles the rendering of view methods to HttpResponse. It expects
that wrapped view methods return a dict. This allows:
- The template to be specified in the method arguments OR within the view method itself
- The dict to be returned as json if required
- The request is passed to the template context, as required by some tags etc
- A hook is provided for adding additional data to the context, from the L{omero.gateway.BlitzGateway}
    or from the request.

Instance Methods [hide private]
 
__getattr__(self, name) source code
 
prepare_context(self, request, context, *args, **kwargs)
Hook for adding additional data to the context dict
source code
 
__call__(ctx, f)
Here we wrap the view method f and return the wrapped method
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__