Change module name and Dockerfile
This commit is contained in:
parent
de60ca084a
commit
5d4d9d3e33
0
ih/__init__.py
Normal file
0
ih/__init__.py
Normal file
13
ih/images.py
Normal file
13
ih/images.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from PIL import Image
|
||||
|
||||
|
||||
def resize_image(fh, img_prop):
|
||||
im = Image.open(fh)
|
||||
# size = 100, 100
|
||||
im.thumbnail(img_prop['size'])
|
||||
print(img_prop['size'])
|
||||
# im.thumbnail(size)
|
||||
thumb_name = img_prop['dest'] + '/thumb_' + img_prop['name']
|
||||
im.save(thumb_name)
|
||||
|
||||
return thumb_name
|
|
@ -71,7 +71,7 @@ TEMPLATES = [
|
|||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'mysite.wsgi.application'
|
||||
WSGI_APPLICATION = 'imagehost.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
|
|
|
@ -12,6 +12,6 @@ import os
|
|||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "imagehost.settings")
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
|
Loading…
Reference in New Issue
Block a user