Module npsgd_web :: Class ClientModelRequest
[hide private]
[frames] | no frames]

Class ClientModelRequest

source code

                object --+    
                         |    
tornado.web.RequestHandler --+
                             |
                            ClientModelRequest

HTTP handler for all model related requests.

Instance Methods [hide private]
 
confirmationNumberCallback(self, response)
Asynchronous callback when model run is populated to confirmation queue.
source code
 
get(self, *args, **kwargs)
Get handler to serve up the html for a specific model.
source code
 
post(self, *args, **kwargs)
Post handler to actually create a model task with given parameters.
source code
 
queueCallback(self, response, model=None)
Asynchronous callback from the queue (for checking if it is up, or has workers).
source code
 
queueErrorRender(self, errorText) source code
 
renderModel(self, model)
Render the html associated with a given model object.
source code
 
setupModelTask(self, model) source code

Inherited from tornado.web.RequestHandler: __init__, async_callback, check_xsrf_cookie, clear, clear_all_cookies, clear_cookie, delete, finish, flush, get_argument, get_arguments, get_browser_locale, get_cookie, get_current_user, get_error_html, get_login_url, get_secure_cookie, get_template_path, get_user_locale, head, initialize, on_connection_close, options, prepare, put, redirect, render, render_string, require_setting, reverse_url, send_error, set_cookie, set_header, set_secure_cookie, set_status, static_url, write, xsrf_form_html

Inherited from tornado.web.RequestHandler (private): _cookie_signature, _execute, _generate_headers, _handle_request_exception, _log, _request_summary, _stack_context, _ui_method, _ui_module

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

Class Variables [hide private]

Inherited from tornado.web.RequestHandler: SUPPORTED_METHODS

Inherited from tornado.web.RequestHandler (private): _ARG_DEFAULT

Properties [hide private]

Inherited from tornado.web.RequestHandler: cookies, current_user, locale, settings, xsrf_token

Inherited from object: __class__

Method Details [hide private]

get(self, *args, **kwargs)

source code 

Get handler to serve up the html for a specific model.

This method will either serve up an error if the queue is down or the queue has no workers or return a nice view of the given model using the model template. Requests to the queue are done asynchronously to avoid blocking.

Overrides: tornado.web.RequestHandler.get

post(self, *args, **kwargs)

source code 

Post handler to actually create a model task with given parameters.

Overrides: tornado.web.RequestHandler.post

queueCallback(self, response, model=None)

source code 

Asynchronous callback from the queue (for checking if it is up, or has workers).

This method will actually perform the rendering of the model if things look good.