#4979: Admin does not allow removal of an image from an ImageField after it has
been set, even if null=True and blank=True
-------------------------------------------+--------------------------------
          Reporter:  robvdl                |         Owner:  nobody    
            Status:  reopened              |     Milestone:            
         Component:  django.contrib.admin  |       Version:  SVN       
        Resolution:                        |      Keywords:  ImageField
             Stage:  Accepted              |     Has_patch:  1         
        Needs_docs:  0                     |   Needs_tests:  0         
Needs_better_patch:  1                     |  
-------------------------------------------+--------------------------------
Comment (by Daniel Pope <d...@mauveinternet.co.uk>):

 To offer as much compatibility as possible for anyone using !ModelAdmin
 hooks I thought it best to preserve the ability to do

 {{{
 if form.cleaned_data['file']:
 }}}

 So I suppose that could be achieved like this

 {{{
 class DeleteFileType(object):
     def __nonzero__(self):
         return False

 DeleteFile = DeleteFileType()
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4979#comment:9>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to