This file contains 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
from PIL import Image as PILImage | |
import os | |
from django.core.files import File | |
from django.core.files.base import ContentFile | |
from cStringIO import StringIO | |
def create_thumbnail_from_image_field(image_field, thumbnail_image_field, | |
thumb_width, thumb_height): | |
""" | |
This function is intended to be used with a model similar to |