mirror of https://github.com/django/django.git
72d541b61c
The fallback logic which allows non-UTF-8 encoded files to be passed to attach_file() even when a `text/*` mime type has been specified is moved to attach(). Both functions now fall back to a content type of `application/octet-stream`. A side effect is that a file's content is decoded in memory instead of opening it in text mode and reading it into a string. Some mimetype-related logic in _create_attachment() has become obsolete as the code moved from attach_file() to attach() already handles this. |
||
---|---|---|
.. | ||
_images | ||
auth | ||
class-based-views | ||
db | ||
forms | ||
http | ||
i18n | ||
testing | ||
cache.txt | ||
checks.txt | ||
conditional-view-processing.txt | ||
email.txt | ||
external-packages.txt | ||
files.txt | ||
index.txt | ||
install.txt | ||
logging.txt | ||
migrations.txt | ||
pagination.txt | ||
performance.txt | ||
python3.txt | ||
security.txt | ||
serialization.txt | ||
settings.txt | ||
signals.txt | ||
signing.txt | ||
templates.txt |