Rum Admin Interface

easy_install tgrum

from tgrum import RumAlchemyController
from tg import config

# Create a prediacte to protect the RumAlchemy admin
is_manager = predicates.has_permission(
    'manage',
    msg=_('Only for people with the "manage" permission')
    )

And change the admin to:

class RootController(BaseController):
    admin = RumAlchemyController(model,
        is_manager,
        template_path=config['paths']['templates'][0],
        render_flash=False,
        )

Done. Now go to admin interface and you should have rum admin interface running. You can add users, change users password, etc. tgrum_admin.png

See http://python-rum.org/wiki/TgRum and http://docs.python-rum.org/tip/user/deploy.html#running-rum-inside-turbogears-2 for more details.

MyWiki: TurboGears2/Rum (last edited 2009-09-06 02:49:33 by localhost)