Matthew Tretter
236eea8459
Move filename generation to generator
2012-12-01 22:09:34 -05:00
Matthew Tretter
20c900df4a
Remove unused imports
2012-12-01 21:52:23 -05:00
Matthew Tretter
7bc82d3624
Remove arguments from generate() method
...
Previously, we had two places where we were passing kwargs that affected
the image generation: the ImageSpec constructor and the generate method.
These were essentially partial applications. With this commit, there's
only one partial application (when the spec is instantiated), and the
generate method is called without arguments. Therefore, specs can now
be treated as generic generators whose constructors just happen to
accept a source_file.
2012-12-01 21:20:33 -05:00
Matthew Tretter
5ecb491e65
Remove unused import
2012-12-01 20:47:55 -05:00
Matthew Tretter
1f06c9ac70
Remove ImageSpecCacheFile
2012-12-01 20:41:08 -05:00
Matthew Tretter
9188499965
Rework template tag for generators
2012-12-01 20:36:31 -05:00
Matthew Tretter
e56d687bb0
Name can be set explicitly on GeneratedImageCacheFile
2012-11-02 22:17:25 -04:00
Matthew Tretter
64d95768f8
Extract GeneratedImageCacheFile
...
As mentioned in #167 , we want to be forward thinking and allow for a
hypothetical spec supertype which has the same functionality as an image
spec but doesn't require a source file: a generator. To this end, I've
renamed `ImageSpec.apply()` to `ImageSpec.generate()` and extracted
a `GeneratedImageCacheFile` base class from `ImageSpecCacheFile`, which
supports the more general interface of a generator--namely, a
`generate()` method with arbitrary args and kwargs.
2012-11-02 00:33:33 -04:00
Matthew Tretter
6377f89e85
IKContentFile must have name attr
2012-10-25 22:43:10 -04:00
Matthew Tretter
aa91a70e46
Make specs know less about source files
2012-10-20 22:53:55 -04:00
Matthew Tretter
98a6fff62d
Add DEFAULT_FILE_STORAGE Setting; Closes #153
2012-10-17 21:09:04 -04:00
Matthew Tretter
ca1db05c4e
Use named logger
2012-10-17 21:00:32 -04:00
Matthew Tretter
d8ce11e86e
Log warning when filename doesn't match expected value
2012-10-17 01:11:05 -04:00
Matthew Tretter
806ebd75b6
Don't return file from generate()
...
The file is `self`
2012-10-17 00:37:02 -04:00
Matthew Tretter
41fa197212
Remove save kwarg--that's what generate() does!
2012-10-17 00:31:38 -04:00
Matthew Tretter
a08edaca56
Handle storage in BaseIKFile
2012-10-17 00:29:51 -04:00
Matthew Tretter
97d47c9c6c
Remove generate_file. apply() does it all!
...
There was a lot of garbage in that method and I don't know why.
2012-10-17 00:23:38 -04:00
Matthew Tretter
5c6d1aef5d
Rename ImageSpecFile
...
You can generate other "spec" files (using apply will get you one). This
one is for saving cache files and its name should reflect that.
2012-10-16 23:51:26 -04:00
Matthew Tretter
738bbfa9a1
Move cache file naming into ImageSpecFile
2012-10-16 23:38:44 -04:00
Matthew Tretter
fdc08aeeb0
Don't extend ImageFieldFile
...
This file isn't just for fields anymore, so we want to get rid of all
the ORM stuff.
2012-10-16 22:52:01 -04:00
Matthew Tretter
13b59ef85e
Reorder methods
2012-10-16 22:33:17 -04:00
Matthew Tretter
a4ef8aa681
Add before_access signal
2012-10-16 22:30:36 -04:00
Matthew Tretter
3308c92a71
Remove SpecWrapper class
...
We don't need it now that we have an ImageSpec class
2012-10-16 22:23:14 -04:00
Matthew Tretter
80b723b510
Move IKContentFile to imagekit.files
2012-10-16 21:31:47 -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
Eric Eldredge
ec9a1f1fda
Spec templatetag returns html by default
...
...if no 'as var' is provided or if the var is printed directly.
2012-09-07 00:25:03 -04:00
Matthew Tretter
d275aaa3f7
A little reorganization
2012-02-13 22:12:07 -05:00