now it 's work def cleanPath(file): path= settings.MEDIA_ROOT+"/here/"+str(file) if default_storage.exists(path): default_storage.delete(path) return "file deleted : "+str(file)
si simple ! :o) tonton On Fri, Apr 22, 2011 at 9:59 AM, Tonton <to.ton...@gmail.com> wrote: > so how to pass over ? > > i made an upload form for tree files > then i use data in these files and create a table. > > next i need tu upload more tree files but in the path there is the tree > file before so i hope to remove it !! > > then django Crying me with SuspiciousOperation > > maybe i am a little bit "brutal" > > def cleanPath(path): > list= default_storage.listdir(path) > for f in list: > file = path + f > if default_storage.exists(file): > default_storage.delete(file) > return "dossier nettoye" > > this is what i am in trouble now but next > i would like to let my users (authenticate user ) to remove table and all > data inside from the website > > thank's for all > Tonton > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.