1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Removed PIL compatability layer per deprecation timeline.

refs #19934.
This commit is contained in:
Tim Graham
2014-03-21 10:54:53 -04:00
parent 6d1ae5e27c
commit 4965a77407
15 changed files with 48 additions and 211 deletions

View File

@@ -27,7 +27,7 @@ to make it dead easy, even for someone who may not be intimately familiar with
that area of the code, to understand the problem and verify the fix:
* Are there clear instructions on how to reproduce the bug? If this
touches a dependency (such as Pillow/PIL), a contrib module, or a specific
touches a dependency (such as Pillow), a contrib module, or a specific
database, are those instructions clear enough even for someone not
familiar with it?

View File

@@ -619,22 +619,20 @@ For each field, we describe the default widget used if you don't specify
* Normalizes to: An ``UploadedFile`` object that wraps the file content
and file name into a single object.
* Validates that file data has been bound to the form, and that the
file is of an image format understood by Pillow/PIL.
file is of an image format understood by Pillow.
* Error message keys: ``required``, ``invalid``, ``missing``, ``empty``,
``invalid_image``
Using an ``ImageField`` requires that either `Pillow`_ (recommended) or the
`Python Imaging Library`_ (PIL) are installed and supports the image
formats you use. If you encounter a ``corrupt image`` error when you
upload an image, it usually means either Pillow or PIL
doesn't understand its format. To fix this, install the appropriate
library and reinstall Pillow or PIL.
Using an ``ImageField`` requires that `Pillow`_ is installed with support
for the image formats you use. If you encounter a ``corrupt image`` error
when you upload an image, it usually means that Pillow doesn't understand
its format. To fix this, install the appropriate library and reinstall
Pillow.
When you use an ``ImageField`` on a form, you must also remember to
:ref:`bind the file data to the form <binding-uploaded-files>`.
.. _Pillow: http://python-imaging.github.io/Pillow/
.. _Python Imaging Library: http://www.pythonware.com/products/pil/
``IntegerField``
~~~~~~~~~~~~~~~~

View File

@@ -841,9 +841,9 @@ optional arguments:
Name of a model field which will be auto-populated with the width of the
image each time the model instance is saved.
Requires the `Python Imaging Library`_.
Requires the `Pillow`_ library.
.. _Python Imaging Library: http://www.pythonware.com/products/pil/
.. _Pillow: http://python-imaging.github.io/Pillow/
By default, :class:`ImageField` instances are created as ``varchar(100)``
columns in your database. As with other fields, you can change the maximum

View File

@@ -226,8 +226,8 @@ User-uploaded content
served in ways that do not follow security best practices. Specifically, an
HTML file can be uploaded as an image if that file contains a valid PNG
header followed by malicious HTML. This file will pass verification of the
libraries that Django uses for :class:`~django.db.models.ImageField` image
processing (PIL or Pillow). When this file is subsequently displayed to a
library that Django uses for :class:`~django.db.models.ImageField` image
processing (Pillow). When this file is subsequently displayed to a
user, it may be displayed as HTML depending on the type and configuration of
your web server.