Customizing RumΒΆ

Rum tries to provide a reasonable CRUD interface out-of-the-box for your model objects but you will probably soon need to tweak some details to make it really useful. For example: Perhaps you want to hide some fields from the forms Rum generates, or tell Rum that it should handle certain field as an email address, or change how a particular model is persisted, etc...

This can be done in a very flexible way by extending or swaping the components Rum uses. Big changes (like handling a new kind of model objects, say from a ZODB database) can be accomplished by creating a new component factory that produces products to handle each kind of model. These components are used to initialize the rum.wsgiapp.RumApp when instantiating it.

Smaller changes (like fine-tuning how a particular model is handled) can be acomplished by extending an exiting “handler” and registering it in the appropiate factory so it is produced whenever the particular model pops up.

Usually all you will need is to extend existing handlers or rum.basefactory.BaseFactory.register() variations of them with their factory. Creating a new factory is only needed for major changes in behaviour.

The most important handlers you’ll need to care about are: The Repository, the View and the Controller.

Previous topic

Rumifying your models - A tutorial

Next topic

Declaring model metadata

This Page

Quick search