Hi Jose,

don't know if the question is still relevant or you solved it already,
but you can either set the *_type attributes to just the classes (not
instances) or you just set the attributes (without the _type suffix) to
the instances.

So either

new_form_type = AddRecordForm

or

class new_form(AddRecordForm):
    __model__ = Monte

But if you don't plan on substituting these classes with something of
your own, there's no need to be so explicit: Just use an
EasyCrudRestController and all of that gets done automagically:
https://github.com/TurboGears/tgext.crud/blob/master/tgext/crud/controller.py#L464

Regards,
Moritz

Am 22.12.2014 um 19:48 schrieb José Mario González-González:
> My CrudRestController does not fill the table. what is the reason?
> only i am problems when I overwrite the function get_all
> 
> 
> |
> class MonteController(CrudRestController):
>     allow_only = predicates.in_group('managers')
>     model = Monte
> 
>     @expose('forplanning.templates.monte', inherit=True)
>     def get_all(self, *args, **kw):
>          return super( MonteController, self).get_all(*args, **kw)
> 
>     class new_form_type(AddRecordForm):
>         __model__ = Monte
> 
>     class edit_form_type(EditableForm):
>         __model__ = Monte
> 
>     class edit_filler_type(EditFormFiller):
>         __model__ = Monte
> 
>     class table_type(TableBase):
>         __model__ = Monte
> 
>     class table_filler_type(TableFiller):
>         __model__ = Monte
> 
> |
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "TurboGears" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/turbogears.
> For more options, visit https://groups.google.com/d/optout.

-- 
Moritz Schlarb

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to