#3297: newforms: Implement FileField and ImageField
---------------------------------------+------------------------------------
   Reporter:  [EMAIL PROTECTED]  |                Owner:  russellm       
     Status:  new                      |            Component:  django.newforms
    Version:  SVN                      |           Resolution:                 
   Keywords:  newforms                 |                Stage:  Accepted       
  Has_patch:  1                        |           Needs_docs:  0              
Needs_tests:  0                        |   Needs_better_patch:  1              
---------------------------------------+------------------------------------
Changes (by russellm):

  * owner:  adrian => russellm
  * status:  reopened => new
  * stage:  Design decision needed => Accepted

Comment:

 I've just attached a slightly modified version of the FileField/ImageField
 patch. This version of the patch:
 
  - Modifies forms to take a "files" argument, for storage of file data.
 This means you no longer have to copy and update your POST dictionary on
 submit. You just call MyForm(request.POST, request.FILES)
  - Introduces an "UploadedFile" temporary object to store the submitted
 file data.
  - Modifies the internals of the form_for_model/instance save method to
 make field saving more generic, rather than making a special case of
 FileField. This should make writing custom fields with unusual save
 requirements much easier.
 
 This patch now has 2 potential backwards incompatibilities:
  1. If you are relying upon auto_id being the 2nd argument on a form
 (rather than explicitly naming auto_id=False), your rendered forms will
 start adding label tags.
  1. If you have written any custom code using value_from_datadict, you
 will need to modify those implementations to handle the new files
 argument.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3297#comment:54>
Django Code <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