Hello, Maybe the snippet which I created today can help you. It displays a delete checkbox next to the <input type="file">: http://www.djangosnippets.org/snippets/469/
However, I'm not sure if it will work in admin. tom On 16.11.2007, at 18:12, Marc Garcia wrote: > > There are a couple of things about FileFields that I want to comment. > > First one is about how to delete content in a FileField. With a > example: > > I've a model: > > class Person(model.Model): > name = models.CharField(maxlength=32) > [...] > picture = models.ImageField(upload_to='pictures', blank=True) > > Imagine that I've created a person record with a picture of anoother > person, and I want to delete it (the picture). How can I do? I think > that in admin it should be a checkbox for FileFields to remove > content. > > Second problem that I have. With an example as well. > > In last application I want my users to upload its own data, so I > create a page with a form generated with form_for_model for previous > model. > > When displayed, for a user that already exists, and already has a > picture, an empty <input type="file" ... /> is displayed for picture > field. User can't see it's own picture with admin's link, and when > saved, old picture is dropped. I think that it should work like in > admin (with delete checkbox). > > Please, comment me what you think about and if necessary I'll develop > fixing patches. > > Thanks! > Marc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---