#10935: forms.ImageField.clean should annotate the object returned by
FileField.clean
----------------------+-----------------------------------------------------
   Reporter:  jdunck  |                Owner:  nobody    
     Status:  new     |            Milestone:  1.2       
  Component:  Forms   |              Version:  SVN       
   Keywords:          |                Stage:  Unreviewed
  Has_patch:  0       |           Needs_docs:  1         
Needs_tests:  0       |   Needs_better_patch:  0         
----------------------+-----------------------------------------------------
 ImageField.clean does some validation that the given file is, in fact, an
 image, but then just returns whatever the FileField gave it-- generally an
 UploadedFile.

 I have a later Form.clean_* method which needs to do further work with the
 image, and so uses Image.open again.

 I think it'd be good to annotate the UploadedFile with an image attribute
 to save the work of parsing the image yet again.

 {{{
 f.image = trial_image
 }}}

 Agree?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10935>
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