Interesting idea. For now, you could always do something like db.mytable._deletable=False, though you would then have to explicitly do something with that in your calls to .grid(), etc. You can also use the ._before_insert, ._before_update, and ._before_delete callbacks to prevent writes once a form has been submitted (just for complete safety), though that won't prevent the grid from presenting UI options for attempting updates.
Anthony On Wednesday, May 15, 2013 3:59:16 PM UTC-4, bapster wrote: > > Similar to the deletable/editable/create arguments for grids, would it > make sense to have those same arguments for table definitions: > db.define_table(...) ? > > I have a use-case where several tables in my database need to be strictly > read-only. Rather than worrying about setting applicable arguments > (deletable=editable=create=False) in all of my grid/smartgrid calls, and > hoping I won't have forgotten about a linked table case, it would be nice > if these arguments could be set on the table definition itself, preventing > any corresponding crud or grid operations from actually modifying the table. > > If there's a way to achieve this already in web2py, please let me know. > -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

