Fixed #2147: file uploads within the update_object generic view now works. Thanks, parlar.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
15437d7a88
commit
efcb5912e4
|
@ -106,6 +106,8 @@ def update_object(request, model, object_id=None, slug=None,
|
||||||
|
|
||||||
if request.POST:
|
if request.POST:
|
||||||
new_data = request.POST.copy()
|
new_data = request.POST.copy()
|
||||||
|
if model._meta.has_field_type(FileField):
|
||||||
|
new_data.update(request.FILES)
|
||||||
errors = manipulator.get_validation_errors(new_data)
|
errors = manipulator.get_validation_errors(new_data)
|
||||||
manipulator.do_html2python(new_data)
|
manipulator.do_html2python(new_data)
|
||||||
if not errors:
|
if not errors:
|
||||||
|
|
Loading…
Reference in New Issue