diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 06:24:52 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 06:24:52 +0100 |
commit | c45eb31e8fd8c079c56c45a72f9358b4b182e572 (patch) | |
tree | e4919efe55643c1ef4702b5cc6cd1d12dabfc1cf /imagekit/options.py | |
parent | b31d022c1ab0ee4e33b477f913aeb200ad9e0b58 (diff) | |
download | troggle-c45eb31e8fd8c079c56c45a72f9358b4b182e572.tar.gz troggle-c45eb31e8fd8c079c56c45a72f9358b4b182e572.tar.bz2 troggle-c45eb31e8fd8c079c56c45a72f9358b4b182e572.zip |
[svn] Switch from photologue to imagekit. Less bloat.
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8338 by cucc @ 5/11/2009 3:08 AM
Diffstat (limited to 'imagekit/options.py')
-rw-r--r-- | imagekit/options.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/imagekit/options.py b/imagekit/options.py new file mode 100644 index 0000000..022cc9e --- /dev/null +++ b/imagekit/options.py @@ -0,0 +1,23 @@ +# Imagekit options +from imagekit import processors +from imagekit.specs import ImageSpec + + +class Options(object): + """ Class handling per-model imagekit options + + """ + image_field = 'image' + crop_horz_field = 'crop_horz' + crop_vert_field = 'crop_vert' + preprocessor_spec = None + cache_dir = 'cache' + save_count_as = None + cache_filename_format = "%(filename)s_%(specname)s.%(extension)s" + admin_thumbnail_spec = 'admin_thumbnail' + spec_module = 'imagekit.defaults' + + def __init__(self, opts): + for key, value in opts.__dict__.iteritems(): + setattr(self, key, value) + self.specs = []
\ No newline at end of file |