This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| from django.core.files.storage import FileSystemStorage | |
| import os | |
| def md5sum(file): | |
| """Calculate the md5 checksum of a file-like object without reading its | |
| whole content in memory. | |
| >>> from StringIO import StringIO | |
| >>> md5sum(StringIO('file content to hash')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Sorl Thumbnail PILL Engine that accepts background color | |
| --------------------------------------------------- | |
| Created on Sunday, February 2012 by Yuji Tomita | |
| Modified on Monday 10, November 2014 by Guillermo Colmenero | |
| """ | |
| from PIL import Image, ImageColor | |
| from sorl.thumbnail.engines.pil_engine import Engine |