#3211: admin crash when uploading an e-mail message as a text file
-----------------------------+----------------------------------------------
Reporter:  akaihola         |       Owner:  adrian
Type: defect | Status: new Priority: normal | Milestone: Component: Admin interface | Version: SVN Severity: normal | Keywords: -----------------------------+----------------------------------------------
In r4259, if I try to upload an e-mail message saved from Mozilla
Thunderbird (an .eml file) in admin, I get this error message:

{{{
Traceback (most recent call last):

  File "/django/core/servers/basehttp.py", line 272, in run
    self.result = application(self.environ, self.start_response)

  File "/django/core/servers/basehttp.py", line 614, in __call__
    return self.application(environ, start_response)

  File "/django/core/handlers/wsgi.py", line 189, in __call__
    response = self.get_response(request)

  File "/django/core/handlers/base.py", line 111, in get_response
    return debug.technical_500_response(request, *sys.exc_info())

  File "/django/views/debug.py", line 131, in technical_500_response
    return HttpResponseServerError(t.render(c), mimetype='text/html')

  File "/django/template/__init__.py", line 160, in render
    return self.nodelist.render(context)

  File "/django/template/__init__.py", line 694, in render
    bits.append(self.render_node(node, context))

  File "/django/template/__init__.py", line 722, in render_node
    raise wrapped

TemplateSyntaxError: Caught an exception while rendering: Nested MIME
messages are not supported

Original Traceback (most recent call last):
  File "/django/template/__init__.py", line 712, in render_node
    result = node.render(context)
  File "/django/template/__init__.py", line 762, in render
    output = self.filter_expression.resolve(context)
  File "/django/template/__init__.py", line 555, in resolve
    obj = resolve_variable(self.var, context)
  File "/django/template/__init__.py", line 640, in resolve_variable
    current = current[bits[0]]
  File "/django/http/__init__.py", line 31, in __getitem__
    for d in (self.POST, self.GET):
  File "/django/core/handlers/wsgi.py", line 136, in _get_post
    self._load_post_and_files()
  File "/django/core/handlers/wsgi.py", line 114, in _load_post_and_files
    self._post, self._files = http.parse_file_upload(header_dict,
self.raw_post_data)
  File "/django/http/__init__.py", line 61, in parse_file_upload
    assert type([]) != type(submessage.get_payload()), "Nested MIME
messages are not supported"
AssertionError: Nested MIME messages are not supported
}}}

Here's my model:

{{{
class EmailUploadBugTestModel(models.Model):
        upload = models.FileField(upload_to='files/%Y/%m/%d')
        class Admin: pass
}}}

--
Ticket URL: <http://code.djangoproject.com/ticket/3211>
Django <http://code.djangoproject.org/>
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