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

Class render_response

source code


Subclass for adding additional data to the 'context' dict passed to templates

Instance Methods [hide private]
 
prepare_context(self, request, context, *args, **kwargs)
This allows templates to access the current eventContext and user from the omero.gateway.BlitzGateway.
source code
 
load_settings(self, request, context, conn) source code

Inherited from decorators.render_response: __call__, __getattr__

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

prepare_context(self, request, context, *args, **kwargs)

source code 

This allows templates to access the current eventContext and user from the omero.gateway.BlitzGateway. E.g. <h1>{{ ome.user.getFullName }}</h1> If these are not required by the template, then they will not need to be loaded by the Blitz Gateway. The results are cached by Blitz Gateway, so repeated calls have no additional cost. We also process some values from settings and add these to the context.

Overrides: decorators.render_response.prepare_context