wiki:DataController
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 4 (modified by fredlin, 13 years ago) (diff)

--

DataController

DataController is a main module in fastdata.

DataController is a fast method to provide CRUD(Create, Remove, Update, Delete)functionality.

You can use this simple function to provide CRUD and customize the DataController's presentation by CSS.

Install tgfastdata

Now fastdata is split from TurboGears core and become a plugin.

Before take advantage of DataController, you need install fastdata plugin first.

$ easy_install tgfastdata 

Use DataController

# controllers.py
from tgfastdata import DataController

class MyApp(controllers.RootController):
    mycrud = DataController(MyModelClass) # provides a quick
                                          # 'n' dirty CatWalk-like
                                          # CRUD interface for your MyModelClass

TODO: Provide more information on how to customise this, eg. get the generated page to extend master.kid