Yes you can.
Just think how web2py works to satisfy a user request, all models in the 
action's path are executed every time and everything is a python program.

So if you have a form that requests field_name, field_type and other 
parameters as necessary you can write to a model file the appropriate 
comands to define your table.
Note that if you use SQLite it does not change field types on the fly so 
you have to delete the whole table and redefine it from scratch.
Other DBs can cope with such changes.

Obviously you need to track which fields have been created but that info is 
available in db.table_name.fields


On Saturday, January 2, 2016 at 8:12:31 AM UTC-5, BIDUR G.C wrote:
>
> Hi All,
>
> I have a specific question. Is it possible to dynamically create table 
> from user interface. I am thinking of something like allowing user to write 
> the name of the column, adding label and assigning field type to it.
>
> Any hint on getting started would be much appreciated.
>
> Many Thanks,
> Bidur
>

-- 
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/d/optout.

Reply via email to