Commit graph

18 commits

Author SHA1 Message Date
Matthew Tretter
84b30e990f Fix imagekit.models.fields.ProcessedImageField 2013-01-23 22:41:23 -05:00
Matthew Tretter
12493b3a0d Spec host must support kwarg "hints"
The registry's `get_spec()` was already supporting kwargs as a means to
provide information about the source to the spec constructor/factory
function, but the ``SpecHost`` class wasn't capable of accepting any.
This commit rectifies that. The main goal purpose of this is to allow a
bound field (the file attached by ``ImageSpecFileDescriptor``)--and the
attached model instance--to be taken into account during the spec
instance creation.

Related: #156
2012-10-20 23:29:07 -04:00
Matthew Tretter
738bbfa9a1 Move cache file naming into ImageSpecFile 2012-10-16 23:38:44 -04:00
Matthew Tretter
5ca8b7f4ba Rename process_file; don't return image object
This function will just be used to apply the spec and create a new file;
useful for transforming images in views, etc.
2012-10-16 22:59:40 -04:00
Matthew Tretter
1452f04cda Remove unused parameter 2012-10-16 22:03:50 -04:00
Eric Eldredge
c0b79a227d Remove ImageSpecFieldFile in favor of ImageSpecFile 2012-10-15 23:53:05 -04:00
Matthew Tretter
d2087aa168 Create ImageSpecs; remove generators 2012-10-04 21:37:20 -04:00
Matthew Tretter
ba9bf1f877 Add image cache strategies
This new feature gives the user more control over *when* their images
are validated. Image cache backends are now exclusively for controlling
the *how*. This means you won't have to write a lot of code when you
just want to change one or the other.
2012-10-03 22:23:11 -04:00
Matthew Tretter
8a2738ca8a Add backend for caching image state 2012-09-06 22:11:23 -04:00
Matthew Tretter
197dfb3485 Add VALIDATE_ON_ACCESS setting 2012-09-06 09:08:45 -04:00
Matthew Tretter
7ad5cf4db5 Use hashes for generated image filenames
While this change means users can no longer specify their own filenames,
changing a property of a processor, for example, will now result in a
new image. This solves a lot of the previous invalidation issues.
2012-07-19 23:48:28 -04:00
Matthew Tretter
becee54c03 Fix pickling of ImageSpecFieldFile
Code now passes the test added in 118f6e4. Hopefully this will
address #97.
2012-07-18 22:25:26 -04:00
German M. Bravo
784afcc95d Simplified path join for the cache 2012-05-12 15:39:12 -04:00
Matthew Tretter
8044b97a33 Extract suggest_extension util from generator 2012-04-19 21:33:52 -04:00
Matthew Tretter
3a5d7da0d8 Validate the image any time the file is required
This means that accessing `path` or `size` will also validate,
closing #109
2012-02-23 17:46:57 -05:00
Matthew Tretter
6816196da7 Use "super" 2012-02-17 18:22:05 -05:00
Timothée Peignier
98066eea93 fix import and formatting 2012-02-14 17:34:51 +01:00
Matthew Tretter
8cdbd96a1f Add files module 2012-02-13 21:44:29 -05:00