How to use Pillow with Django

前端 未结 4 1462
借酒劲吻你
借酒劲吻你 2021-02-18 16:44

I installed Pillow and now want to use it on my Django site to allow uploading of images of through my admin page. See previous question.

What changes do I need to make

4条回答
  •  误落风尘
    2021-02-18 17:40

    First, install pillow (having virtualenv activated preferably) with:

    pip install pillow
    

    You should import it in Django project:

    from PIL import Image
    

    After that you don't need to change settings or anything else. All the modules should work.

提交回复
热议问题