db.mytable.myfield.clone(name='newname', ...)

The .clone() method makes a copy of the Field object, and if you want to 
alter any of the attributes, they can be passed as keyword args (e.g., the 
above example changes the field name to "newname").

Anthony

On Friday, February 28, 2014 4:04:59 AM UTC-5, mcamel wrote:
>
> Has field inheritance been implemented?. I'd swear it was, but i cannot 
> find it...
>
> Now i use dummy tables for this, but i have to define different dummies to 
> get different combinations of names and amount of fields of these types on 
> each table.
>
> Regards.
>
>
> El miércoles, 24 de agosto de 2011 17:55:05 UTC+2, DenesL escribió:
>>
>>
>> @ Andrew: thanks, yes that is the idea. 
>>
>> @ Bruno: thank you, but I would like to be able to template also from 
>> existing tables (legacy mostly) not just from explicit template 
>> definitions, the sample function above does that I believe. 
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to