I think we should be able to do:

db.define_table('thing',
   Field(....),
   Field.from_template(...), #1
   Field.virtual(...), #2
   Field.lazy(...), #2
   other_table1,
   other_table2,
   ...
   singular = 'thing', #1
   plural = 'things', #1
   format = '....',
   migrate = True)

#1 are easy. #2 not so easy. yet all these changes must be coordinated
to have one consistent API.

On Aug 23, 10:47 pm, Bruno Rocha <rochacbr...@gmail.com> wrote:
> Of course or you pass desired template explicit to Field.template or set
> globally in DAL
>
> # define field templates
> DAL.field_templates = dict(
>     text = Field('name','text',requires=IS_NOT_EMPTY(), represent=...),
>     integer = Field('name','integer',.....)
> )
>
> Field.template(integer,'....') and take from field_templates
>
> or pass dorectly taking from the dict/Storage
>
> Field.template(mytemplates.text,'...')

Reply via email to