Commit graph

13 commits

Author SHA1 Message Date
Matthew Tretter
544d5b874a Added AdminThumbnailView field.
You're no longer restricted to just one, special-case admin thumbnail. Make as
many as you want by adding AdminThumbnailView properties to your model and
including them in your admin class's `list_display` tuple. You can also provide
a custom template. Note that (because this change introduces templates to
imagekit), imagekit is now required in INSTALLED_APPS.

Ideally we could get this stuff out of the model, but we'll have to look into
whether that's possible without making things really complicated.
2011-09-20 19:37:04 -04:00
Matthew Tretter
82348d4931 Changed how cache files are named.
Removed the cache_dir, cache_filename_fields and cache_filename_format
properties of IKOptions. While these were very powerful, I felt that it was
unnecessarily confusing to have two properties (cache_dir and
cache_filename_format) that determine the filename. The new cache_to property is
modeled after ImageField's upload_to and behaves almost identically (the only
exception being that a callable value receives different arguments). In
addition, I felt that the interpolation of model properties provided by
cache_filename_fields, though useful, would be better handled by a utility
function outside of this library.
2011-09-18 21:08:49 -04:00
Matthew Tretter
8cfe485a5a Storage can be specified on a per-spec basis.
If not defined on the spec, IKOptions.default_storage will be used. If that's
not defined, it will fall back to the image field's storage.
2011-09-10 00:25:34 -04:00
Matthew Tretter
57a28091c5 Added default_image_field
This works kind of like Django's models' _default_manager. If your specs don't
specify an image_field, and your IKOptions don't specify a default_image_field,
the first ImageField your model defines will be used.
2011-09-10 00:25:27 -04:00
Matthew Tretter
4c78f2d24c _imgfield is now a property of ImageSpec
Moved _imgfield from ImageModel to ImageSpec. Theoretically, this will allow you
to have specs that use different image fields on the same model.
2011-09-10 00:24:37 -04:00
Matthew Tretter
5e00de5204 Admin thumbnails. 2011-09-10 00:23:47 -04:00
Matthew Tretter
a9895f335a Using spec properties from ImageModel. 2011-09-08 10:00:22 -04:00
Matthew Tretter
2387cc4be2 Added ability to specify specs in IKOptions directly. 2011-09-02 23:35:58 -04:00
Josh Ourisman
5976a512e6 allowing any fields on the object to be specified for use in naming of generated images; default to allowing pk 2011-06-28 14:27:47 -04:00
Justin Driscoll
125c2c1470 Cleaned up trailing whitespace 2009-12-19 11:01:54 -05:00
Ben Jackson
26f01721df Add IKOption.storage to explicitly set cached thumbnail storage.
Original image storage is still the default, and the original image
is always read from its own storage.
2009-12-17 22:26:19 -08:00
Justin Driscoll
82bd312baf Renamed config to defaults and modified a couple of default options 2009-02-26 09:59:05 -05:00
Ariel Nunez
920bf47128 Added setup.py and relocated source dir 2009-02-02 15:46:41 -05:00
Renamed from src/imagekit/options.py (Browse further)