mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-04-23 14:34:42 +00:00
Forgot to addremove
This commit is contained in:
parent
390e60c558
commit
82a6812fea
4 changed files with 23 additions and 2 deletions
|
|
@ -11,5 +11,6 @@ class EnhanceSmall(processors.Adjustment):
|
|||
contrast = 1.2
|
||||
sharpness = 1.1
|
||||
|
||||
class Thumbnail(ImageSpec):
|
||||
class DjangoAdminThumbnail(ImageSpec):
|
||||
access_as = 'admin_thumbnail'
|
||||
processors = [ResizeThumbnail, EnhanceSmall]
|
||||
21
src/imagekit/options.py
Normal file
21
src/imagekit/options.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Imagekit options
|
||||
|
||||
class Options(object):
|
||||
""" Class handling per-model imagekit options
|
||||
|
||||
"""
|
||||
# Images will be resized to fit if they are larger than max_image_size
|
||||
max_image_size = None
|
||||
# Media subdirectories
|
||||
image_dir_name = 'images'
|
||||
cache_dir_name = 'cache'
|
||||
# If given the image view count will be saved as this field name
|
||||
save_count_as = None
|
||||
# String pattern used to generate cache file names
|
||||
cache_filename_format = "%(filename)s_%(specname)s.%(extension)s"
|
||||
# Configuration options coded in the models itself
|
||||
config_module = 'imagekit.config'
|
||||
|
||||
def __init__(self, opts):
|
||||
for key, value in opts.__dict__.iteritems():
|
||||
setattr(self, key, value)
|
||||
|
|
@ -1 +0,0 @@
|
|||
# Create your views here.
|
||||
Loading…
Reference in a new issue