#14039: FileField special-casing breaks MultiValueField including a FileField
---------------------------------+------------------------------------------
          Reporter:  carljm      |         Owner:  carljm       
            Status:  new         |     Milestone:               
         Component:  Forms       |       Version:  SVN          
        Resolution:              |      Keywords:  sprintSep2010
             Stage:  Unreviewed  |     Has_patch:  1            
        Needs_docs:  0           |   Needs_tests:  0            
Needs_better_patch:  0           |  
---------------------------------+------------------------------------------
Changes (by radiac):

  * needs_better_patch:  1 => 0

Comment:

 Replying to [comment:4 carljm]:
 > Rather, I think MultiValueField subclasses which want to invoke
 clean_takes_initial behavior will probably have to override clean() anyway
 and provide the specific initial-handling that makes sense for their case.

 I think you're right - I must admit to my version not being generic, hence
 no patch! I could do a workaround for my specific situation, but because
 the initial value is in compressed format, a generic solution would really
 need the initial value to be decompressed first, which is currently done
 by the widget. Leaving it to be implemented by a subclass therefore seems
 sensible; perhaps noting that in the comments/documentation would be a
 good idea.

 I've removed the needs_better_patch flag - as you say, I think this a
 useful improvement which makes it possible for people to take the next
 steps without needing to resort to patching django themselves.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14039#comment:5>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to