I all,
problem on deleting files loaded,

if delete/update a record in allegato table 
then documento in uploads folder being deleted/updated correctly.

if delete a record in prodotto table 
  records in allegato table are correctly CASCADE deleted, 
  but files in uploads folder still remain.

any suggestion?

my code...

DB:
db.define_table('prodotto',
        Field('nome'),
        format='%(nome)s',
        plural='prodotti')

db.define_table('allegato',
        Field('descrizione',requires=IS_NOT_EMPTY()),
        Field('documento','upload',autodelete=True),
        Field('prodotto','reference 
prodotto',writable=False,readable=False),
        format='%(descrizione)s',
        plural='allegati')

CONTROLLER:
def index():
    grid = SQLFORM.smartgrid(db.prodotto,
                        deletable=True,
                        editable=True,
                        create=True,
                        csv=False)
    return dict(grid=grid)

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to