You probably have to add an edit_form attribute to the UserController to let the crudrestcontroller know which form it has to use to permit editing the user.
Take a look at http://www.turbogears.org/2.1/docs/main/Extensions/Crud/index.html#forms for documentation about forms in CrudRestController. On Wed, Dec 7, 2011 at 8:36 AM, Himalayan <[email protected]> wrote: > Hi > > I am developing my first Turbo Gears 2 application. I have been following > all the tutorials etc. available. However, when creating a form to add a new > user I am getting the following error. > > AttributeError: 'UserController' object has no attribute 'edit_form' > > The relevant code is > > from sprox.tablebase import TableBase > class UserTable(TableBase): > __model__ = MCUser > user_table = UserTable(DBSession) > > from sprox.fillerbase import TableFiller > class UserTableFiller(TableFiller): > __model__ = MCUser > user_table_filler = UserTableFiller(DBSession) > > """ > MCUsers > """ > > class UserController(CrudRestController): > model = MCUser > allow_only = in_group('standard') > > @expose('mc27.templates.register_user') > def index(self): > logging.info("AA: Entering user / default") > return "empty" > > def adduser(AddRecordForm): > logging.info('AA: entering add user') > user_filler = user_table_filler > > Any help would be appreciated. If I need to post more details, please let me > know. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/turbogears/-/CFFEXEOYZAMJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

