*Code wurde PEP-8 gerecht formatiert * Kleine Fehler die der PyCharm Inspector beanstandet wurden korrigiert
24 lines
425 B
Python
24 lines
425 B
Python
from imagekit.specs import ImageSpec
|
|
from imagekit import processors
|
|
|
|
|
|
class ResizeThumbnail(processors.Resize):
|
|
width = 60
|
|
height = 60
|
|
crop = True
|
|
|
|
|
|
class ResizeProfile(processors.Resize):
|
|
width = 140
|
|
height = 140
|
|
crop = True
|
|
|
|
|
|
class Thumbnail(ImageSpec):
|
|
pre_cache = True
|
|
processors = (ResizeThumbnail,)
|
|
|
|
|
|
class Profile(ImageSpec):
|
|
pre_cache = False
|
|
processors = (ResizeProfile,) |