Thanks to all - regards, Martin.
2013/2/17 Mark <czhang2...@gmail.com> > I think this can be done in "edit" page of each record. If a record is not > editable based on some conditions, redirect it to another page. > > # In edit page of each record > if len(request.args) > 2 and request.args[-3] == 'edit': > record = db[request.args[-2]](request.args[-1]) > if record_not_editable: > redirect(URL(some_where_else)) > > > > On Saturday, February 16, 2013 6:14:44 AM UTC-5, mweissen wrote: >> >> I want to change the value of "writable" depending on another field, >> something like >> >> db.define_table('person', >> Field('name'), >> Field('test', 'boolean', writable=False), >> Field('testenable', 'boolean', default=True), >> ) >> >> db.person.test.writable = lambda v,r: r.testenable >> >> This does not work because writable must not be callable. >> Any ideas? >> Maybe something like form[0]... = .... ? >> > -- > > --- > 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. > > > -- --- 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.