CatwalkInstallationInstall catwalk easy_install catwalk Then, in your controller, import catwalk from catwalk.tg2 import Catwalk
from mypackage.model import DBSession, metadata In your controller method, instantiate catwalk. catwalk = Catwalk(DBSession, metadata) You should then see a screen like this:
And if you click around, you can find forms like this:
Securing CatwalkBy default, Catwalk is not secured. This is because it is up to the developer to provide the method for security, but it can easily be secured by extending the Catwalk controller object and using the secure controller methods provided by Turbogears. Here is an example code snippet to showing how you could secure your catwalk so that only admins can view it: Subclass Catwalkfrom catwalk.tg2 import Catwalk
from repoze.what.predicates import in_group
class SecuredCatwalk(Catwalk):
allow_only = in_group('manager')Instantiate Catwalkcatwalk = SecuredCatwalk(DBSession, metadata)
|