summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-01-15 02:33:31 +0000
committerRamiro Morales <cramm0@gmail.com>2012-01-15 02:33:31 +0000
commit665ec600a40ffc3c9baea30be9c8765939512748 (patch)
treea558e8694a93d4b97de4abc7857c71ba440ad570 /docs
parentc5dcba4159e00ed7fc43b605946be489602ab369 (diff)
Made email attachment handling code accept non-ASCII filenames.
Thanks to Anton Chaporgin for the report and to Claude Paroz for the patch. Fixes #14964. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/unicode.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt
index 08f738c879..1286dcfdd0 100644
--- a/docs/ref/unicode.txt
+++ b/docs/ref/unicode.txt
@@ -322,7 +322,9 @@ can be non-ASCII::
sender = u'Arnbjörg Ráðormsdóttir <arnbjorg@example.com>'
recipients = ['Fred <fred@example.com']
body = u'...'
- EmailMessage(subject, body, sender, recipients).send()
+ msg = EmailMessage(subject, body, sender, recipients)
+ msg.attach(u"Une pièce jointe.pdf", "%PDF-1.4.%...", mimetype="application/pdf")
+ msg.send()
Form submission
===============