That is just what I referred in my last email, but maybe it didn't 
understand or I didn't explain myself with the correct words... Maybe 
there is a lack of "standard" ways of doing things like this one Yarko 
comment... in this case what if we would have a "standards" heritable 
methods  acting as transversal catchable hooks, like "ondelete", 
"oncreate", "onloaded", "onvalidate", "onaccess" (I know this it is), 
maybe to be able to i.e. "do something when framework load a Form, or 
delete a Field, or create a Button, or even access to Admin, or..."  
This way and "interoperable/cross" paragraph (or matrix table) in 
documentation would be sufficient to explain some manageable object 
actions.  Sorry If I'm wrong.

Regards,
Alex F

El 22/12/2009 6:31, Yarko Tymciurak escribió:
> On Dec 21, 11:07 pm, Thadeus Burgess<thade...@thadeusb.com>  wrote:
>    
>> dope...
>>      
> What!?!  You mean this wasn't intuitively _obvious_?  (ha!  It sure
> isn't to me, and I wouldn't expect anyone else - although once this
> has bitten you a time or two, it becomes memorable....)
>
> No, no dope at all....
>
> There are a lot of fields for the Field() constructor, and this is a
> sort of extra-sql "ondelete" one ... would it be "more intuitive" (?)
> if it were just a special, extra-sql behavior, an extension of
> 'ondelete'? ...
>
> You (everyone) probably wants to get familiar with the section,
> starting on P.154 of the 2009/v2 manual on the Field() constructor,
> and it's defaults.  Curiously, it is under section 6.4, titled
> "Migrations" (which is probably just a mistake; there could have been
> an additional section/name):
>
> • autodelete - determines if the corresponding uploaded file should be
> deleted when the record referencing the file is deleted. For "upload"
> fields only.
>
> - Yarko
>
>    
>> http://markmail.org/message/vdyy5j5fclv2vgnh#query:web2py%20delete%20...
>>
>> :)
>>
>> [SOLVED]
>>
>> -Thadeus
>>
>> On Mon, Dec 21, 2009 at 10:57 PM, Thadeus 
>> Burgess<thade...@thadeusb.com>wrote:
>>
>>
>>
>>      
>>> If I am deleting an upload field from my database, how do I also seamlessly
>>> remove its corresponding file?
>>>        
>>      
>>> Currently I have a query as such. Would I need to perform a select query
>>> first, looping through the filenames and using os.unlink to delete these
>>> files, and then remove the record from the database?
>>>        
>>      
>>> db(my_super_awesome_cleaning_query).delete()
>>>        
>>      
>>> -Thadeus
>>>        
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>    

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to