Skip to content
Snippets Groups Projects
Commit a28f92e7 authored by Walter Renner's avatar Walter Renner
Browse files

Merge pull request #8 from bashu/patch-1

added Support for custom storage systems
parents 1233bb1e d1569f01
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import sys
from django.db import models
from django.conf import settings
from django.core.files.storage import default_storage as storage
from django.core.files.uploadedfile import InMemoryUploadedFile
from PIL import Image
......@@ -62,7 +63,7 @@ class Favicon(models.Model):
if update and fav.faviconImage:
fav.del_image()
if self.faviconImage and not fav.faviconImage:
tmp = Image.open(self.faviconImage.path)
tmp = Image.open(storage.open(self.faviconImage.name))
tmp.thumbnail((size, size), Image.ANTIALIAS)
tmpIO = BytesIO()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment