Not really. How about:

def set_on_delete(db, tablename, f):
    db._LAZY_TABLES[tablename][2]['on_define'] = f

The problem is that we cannot use the notation db.table.on_delete = f since 
db.table will cause the table to be instantiated and that what lazy tables 
are trying to postpone.


On Friday, 25 January 2013 09:55:53 UTC-6, Paolo valleri wrote:
>
> Hi Massimo, just wondering if you have found something better for this.
> Paolo
>
>
> 2013/1/17 Massimo Di Pierro <[email protected] <javascript:>>
>
>> Me neither. Let's think of a solution on web2py_developers.
>>
>>
>> On Wednesday, 16 January 2013 01:59:27 UTC-6, Paolo valleri wrote:
>>>
>>> Hi Massimo, personally I don't like this:
>>>
>>>> db._LAZY_TABLES['**yourtablename'][2]['on_define'**] = ....
>>>>
>>> it is neither easy to remember nor easy to understand what it dows. 
>>> Something more friendly would be better from my point of view, If adding an 
>>> on_define could create misunderstanding since the parameter is different 
>>> from the 'common' on_define, we could use an other totally fresh name, 
>>> i.e., auth.set_settings, auth.customize and so on to do the same thing.
>>>
>>> -- 
>>>  Paolo 
>>>
>>  -- 
>>  
>>  
>>  
>>
>
>
>
> -- 
>  Paolo 
>

-- 

--- 
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.


Reply via email to