Man, how could I miss that?, right in the doc... I will like to use a 
calculated field for that, but update_naive will work, many thanks.

El sábado, 30 de julio de 2016, 3:17:16 (UTC-4), José L. escribió:
>
> Have you tried update_naive when using the after_update trigger? It should 
> avoid the infinite loop
>
> El 30/7/2016 8:06, "Carlos Cesar Caballero" <[email protected] 
> <javascript:>> escribió:
>
>> Hi everyone, I am almost finishing a plugin for building automatic slug 
>> fields, but I want to build editable slugs. 
>>
>> I can right now when the user creates a new record in the database, fill 
>> a field with the slug, but I need the ability to update it too. 
>> If the field is created for the very first time, I have an algoritm to 
>> create the slug (simply using the IS_SLUG validator), but if the field is 
>> edited, I need to use a different one, the problem is that the calculated 
>> field feature not specify whether the field is created or edited (or at 
>> least I don't find it), and I can't use the after_update trigger because it 
>> falls in an infinite loop when I update the field. 
>>
>> How can I do that?
>>
>> Greetings.
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to