rum.controller

ControllerFactory

class rum.controller.ControllerFactory
__call__(resource, parent=None, **kw)

Creates an instance of something for the given arguments. If the class that we shall instantiate (the one returned by get()) accepts a factory keyword argument the we will pass it a wekaref.proxy of ourselves so it can know who created and access resources with a long lifecycle (eg: database connections, etc...) common to all products. Arguments used to call the factory will also be tried to be passed to the product’s constructor.

get(resource, parent=None, remote_name=None, action=None, prefix=None, args=None)

Returns a class implementing rum.interfaces.IController

Controller

class rum.controller.Controller
__call__(environ, start_response)
call_action(routes)

Call the controller action

handle_exception(exception, routes)

Do something when call_action() raises an exception. Probably raise an appropiate HTTPException.

The output from this function will be processed by process_output()

process_output(output, routes)

Process output from action.

CRUDController

class rum.controller.CRUDController(error_handlers=None)

REST Controller styled on the Atom Publishing Protocol

default_limit(resource, parent, action)

Default pagination items limit

resolve_conflict(new)

Shows a form to the user where the current state of an object is shown besides a form with the old state (left in self.form_result) so the user can resolve the conflict.

Note

This method is not routeable, it is intended to be called from a routeable method or exception handler.

Table Of Contents

Previous topic

rum.basefactory

Next topic

rum.repository

This Page