If so, then it (the file) shouldn't be deleted when you delete()
the object? Also, M/R branch seems has no methods like
_pre_save/_post_save,
instead you can subclass save/delete methods. There are some references
in db.models.signals, dont know how to use them though

Clint Ecker написав:
> This is correct.  I believe the general consensus is that the developer
> should take care of file destruction on their own.  Perhaps in a _pre_save
> method?
>
> Clint
>
> On 4/20/06, Denis <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi
> >
> > It looks like old files aren't being removed after object change.
> > That is, if i change the object like the 1 below and upload new file
> > via admin interface, old file remains in the directory, though nothing
> > refers to it :-/
> >
> > class Picture(models.Model):
> >     fullsize = models.ImageField(upload_to='%Y/%m/%d')
> >     ...
> >
> >
> > >
> >
>
>
> --
> ---
> Clint Ecker
> [EMAIL PROTECTED]
> http://phaedo.cx
>
> ------=_Part_23578_25260128.1145537234619
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 1359
>
> This is correct.&nbsp; I believe the general consensus is that the developer 
> should take care of file destruction on their own.&nbsp; Perhaps in a 
> _pre_save method?<br><br>Clint <br><br><div><span class="gmail_quote">On 
> 4/20/06, <b class="gmail_sendername">
>
> Denis</b> &lt;<a href="mailto:[EMAIL PROTECTED]" target="_blank" 
> onclick="return top.js.OpenExtLink(window,event,this)">[EMAIL 
> PROTECTED]</a>&gt; wrote:</span><blockquote class="gmail_quote" 
> style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; 
> padding-left: 1ex;">
>
> <br>Hi<br><br>It looks like old files aren't being removed after object 
> change.<br>That is, if i change the object like the 1 below and upload new 
> file<br>via admin interface, old file remains in the directory, though nothing
> <br>refers to it :-/<br><br>class 
> Picture(models.Model):<br>&nbsp;&nbsp;&nbsp;&nbsp;fullsize = 
> models.ImageField(upload_to='%Y/%m/%d')<br>&nbsp;&nbsp;&nbsp;&nbsp;...<br><br><br><br><br></blockquote></div><br><br
>  clear="all"><br>-- <br>---<br>Clint Ecker<br><a href="mailto:[EMAIL 
> PROTECTED]" target="_blank" onclick="return 
> top.js.OpenExtLink(window,event,this)">[EMAIL PROTECTED]</a><br><a 
> href="http://phaedo.cx"; target="_blank" onclick="return 
> top.js.OpenExtLink(window,event,this)">
> http://phaedo.cx</a>
> 
> 
> ------=_Part_23578_25260128.1145537234619--


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to