Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2147: file uploads within the update_object generic view now w…

…orks. Thanks, parlar.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit efcb5912e467ab14435a417412754a234e436f73 1 parent 15437d7
Jacob Kaplan-Moss authored June 13, 2006

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  django/views/generic/create_update.py
2  django/views/generic/create_update.py
@@ -106,6 +106,8 @@ def update_object(request, model, object_id=None, slug=None,
106 106
 
107 107
     if request.POST:
108 108
         new_data = request.POST.copy()
  109
+        if model._meta.has_field_type(FileField): 
  110
+            new_data.update(request.FILES)
109 111
         errors = manipulator.get_validation_errors(new_data)
110 112
         manipulator.do_html2python(new_data)
111 113
         if not errors:

0 notes on commit efcb591

Please sign in to comment.
Something went wrong with that request. Please try again.