2009-01-04 18:42:25 +00:00
|
|
|
# Imagekit options
|
2009-01-08 20:04:20 +00:00
|
|
|
from imagekit import processors
|
|
|
|
|
from imagekit.specs import ImageSpec
|
|
|
|
|
|
2009-01-04 18:42:25 +00:00
|
|
|
|
|
|
|
|
class Options(object):
|
|
|
|
|
""" Class handling per-model imagekit options
|
|
|
|
|
|
|
|
|
|
"""
|
2009-01-06 19:00:53 +00:00
|
|
|
image_field = 'image'
|
2009-01-08 18:37:15 +00:00
|
|
|
crop_horz_field = 'crop_horz'
|
|
|
|
|
crop_vert_field = 'crop_vert'
|
2009-01-08 21:11:15 +00:00
|
|
|
preprocessor_spec = None
|
2009-01-08 17:45:06 +00:00
|
|
|
cache_dir = 'images'
|
2009-01-04 18:42:25 +00:00
|
|
|
save_count_as = None
|
|
|
|
|
cache_filename_format = "%(filename)s_%(specname)s.%(extension)s"
|
2009-01-09 14:34:44 +00:00
|
|
|
admin_thumbnail_spec = 'admin_thumbnail'
|
2009-01-09 14:07:10 +00:00
|
|
|
spec_module = 'imagekit.config'
|
2009-01-04 18:42:25 +00:00
|
|
|
|
|
|
|
|
def __init__(self, opts):
|
|
|
|
|
for key, value in opts.__dict__.iteritems():
|
2009-01-06 19:00:53 +00:00
|
|
|
setattr(self, key, value)
|
|
|
|
|
self.specs = []
|