diff options
Diffstat (limited to 'django/views')
-rw-r--r-- | django/views/debug.py | 6 | ||||
-rw-r--r-- | django/views/generic/create_update.py | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index 16cf937d80..6cbbde987b 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -111,6 +111,12 @@ def technical_500_response(request, exc_type, exc_value, tb): }) tb = tb.tb_next + if not frames: + frames = [{ + 'filename': '<unknown>', + 'function': '?', + 'lineno': '?', + }] t = Template(TECHNICAL_500_TEMPLATE) c = Context({ 'exception_type': exc_type.__name__, diff --git a/django/views/generic/create_update.py b/django/views/generic/create_update.py index 0804cdf30b..c6d7db7af5 100644 --- a/django/views/generic/create_update.py +++ b/django/views/generic/create_update.py @@ -106,6 +106,8 @@ def update_object(request, model, object_id=None, slug=None, if request.POST: new_data = request.POST.copy() + if model._meta.has_field_type(FileField): + new_data.update(request.FILES) errors = manipulator.get_validation_errors(new_data) manipulator.do_html2python(new_data) if not errors: |