Matthew Tretter
75962976d0
Add stringify methods to LazyGeneratedImageFile
2013-01-31 19:41:54 -05:00
Matthew Tretter
d6b73b8da7
Renaming/repackaging of generated file related classes
2013-01-31 19:24:08 -05:00
Matthew Tretter
8e6abc1e65
Remove ensure_exists
...
`generate()` now plays double duty
2013-01-31 10:07:27 -05:00
Matthew Tretter
01fad6e4c6
Fix registration bug
2013-01-31 10:07:27 -05:00
Matthew Tretter
04aa72c1f9
Rename cache things (it isn't cachine)
...
https://twitter.com/alex_gaynor/statuses/257558176965206016
2013-01-31 10:07:20 -05:00
Matthew Tretter
7f6188623c
Merge branch 'cacheables' into ik-next
2013-01-29 02:27:24 -05:00
Matthew Tretter
f0dbe32f7a
Fix pickling error
2013-01-29 02:27:03 -05:00
Matthew Tretter
54ca5da15d
Improve generator id pattern matching
...
This behavior allows users to easy generate images by app, model, or
field.
2013-01-29 02:22:00 -05:00
Matthew Tretter
e0ffb246ae
Always use colon as segment separator
2013-01-29 02:17:52 -05:00
Matthew Tretter
e48817a5ec
Update warmimagecache to use new cacheable registry
2013-01-29 01:53:23 -05:00
Matthew Tretter
ca4f090e63
Fix source callbacks on strategies
2013-01-29 01:48:06 -05:00
Matthew Tretter
3931b552a0
Separate source groups and cacheables.
...
This allows a sensible specialized interface for source groups, but also
for ImageKit to interact with specs using the generalized image
generator interface.
2013-01-29 01:40:00 -05:00
Matthew Tretter
5b44564318
Add LazyGeneratedImageCacheFile
2013-01-28 21:46:04 -05:00
Matthew Tretter
a3e9a080d4
Revert signal names
2013-01-28 21:45:58 -05:00
Matthew Tretter
cef3a41d86
Merge branch 'ik-next' into cacheables
...
Conflicts:
imagekit/management/commands/warmimagecache.py
imagekit/registry.py
2013-01-28 21:45:37 -05:00
Eric Eldredge
eb9089e0c8
Register cacheables as generators instead of items
2013-01-24 00:04:43 -05:00
Matthew Tretter
c202234e82
Fix imagekit.forms.fields.ProcessedImageField
2013-01-23 22:54:25 -05:00
Matthew Tretter
b45a22abe6
Add test for imagekit.forms.fields.ProcessedImageField
2013-01-23 22:54:08 -05:00
Eric Eldredge
a8855d4c27
Change spec/source registry to generator/cacheable
2013-01-23 22:46:57 -05:00
Matthew Tretter
f4917ab7ca
Clean up util method
2013-01-23 22:41:36 -05:00
Matthew Tretter
84b30e990f
Fix imagekit.models.fields.ProcessedImageField
2013-01-23 22:41:23 -05:00
Matthew Tretter
c6f2c2e7a7
Add test for ProcessedImageField
2013-01-23 22:40:57 -05:00
Matthew Tretter
234082e63c
Extract generate() util, to make files Django likes
2013-01-23 22:34:29 -05:00
Matthew Tretter
9dd7bef709
Simplify import
2013-01-23 22:07:31 -05:00
Matthew Tretter
d52b9c8100
Add utility for extracting field info
2013-01-23 21:47:54 -05:00
Matthew Tretter
4737ac64c4
Specs no longer accept arbitrary kwargs
...
Only the source.
2013-01-23 21:35:38 -05:00
Matthew Tretter
6ff1d35fbe
Remove unused import
2013-01-23 21:31:53 -05:00
Matthew Tretter
eef1e41448
Remove code that used old filename kwarg
2013-01-23 21:28:23 -05:00
Matthew Tretter
d632fc70fa
Copy contents to NamedTemporaryFile if generated file has no name
2013-01-23 21:27:21 -05:00
Matthew Tretter
4ecfa5d35e
Don't rely on source filename being relative path
...
Closes #180
2013-01-13 23:40:26 -05:00
Matthew Tretter
8c5a571293
Remove unused import
...
Fixes flake8 error
2013-01-13 23:35:19 -05:00
Matthew Tretter
e5b15d09bd
Remove _generateimage utility.
2013-01-09 00:28:29 -05:00
Matthew Tretter
5acce98223
Remove extra space
2013-01-09 00:26:47 -05:00
Matthew Tretter
219b8507ad
Add thumbnail tag tests
2013-01-09 00:25:28 -05:00
Matthew Tretter
43a1f49498
New thumbnail tag syntax! Closes #177
2013-01-09 00:25:08 -05:00
Matthew Tretter
3177eb8e19
Extract utils for use in other modules
2013-01-08 23:36:22 -05:00
Matthew Tretter
11d511f9cc
Extract util for parsing common bits.
...
In preparation for new thumbnail and placeholder tag syntaxes (#177 and
#176 ) which share some (but not all) syntax with the generateimage tag.
2013-01-08 22:42:42 -05:00
Matthew Tretter
658bb22c78
Special case serialization of ImageFieldFiles
...
Closes #168
2013-01-08 21:52:56 -05:00
Matthew Tretter
c2dedaa2b8
Use file name; not file, which can't be pickled
2013-01-08 20:57:19 -05:00
Matthew Tretter
faee0fa537
Correct typo
2013-01-08 20:36:17 -05:00
Matthew Tretter
d80f2f26a9
"source" now refers to the file itself
2012-12-11 22:53:13 -05:00
Matthew Tretter
184c13dd4e
More source_group renaming
2012-12-11 22:41:10 -05:00
Matthew Tretter
52fb4e24be
Add thumbnail templatetag
...
Finally!
2012-12-07 00:42:11 -05:00
Matthew Tretter
30e40b4916
Add TODO for unregistration
2012-12-07 00:17:35 -05:00
Matthew Tretter
c69c2d087e
Create Thumbnail spec; closes #175
2012-12-06 23:48:09 -05:00
Matthew Tretter
1fb1d83c56
Add Thumbnail processor
2012-12-06 23:22:02 -05:00
Matthew Tretter
8c80ba3b4f
GeneratedImageCacheFile stores file manipulation attributes
...
Everything for dealing with files should be part of
GeneratedImageCacheFile--not the generator. The fact that
GeneratedImageCacheFile can get this information (storage, filename,
etc.) is a convenience so that the user only has to define one class
(the generator) to fully specify their functionality, but handling the
cache file is not part of the core responsibility of the generator.
This is also the reason for the renaming of `get_filename` and `storage`
to `cache_file_name` and `cache_file_storage`: the generator is just as
useful for those who want to generate persistent files. But the original
attribute names didn't indicate that they were used only for cache
files. The new ones do, and don't preclude the addition of other
versions that would be used by another `File` subclass for specifying
file names or storage classes.
2012-12-06 19:54:26 -05:00
Matthew Tretter
12307c97aa
Use state--not constructor args--to recreate dynamic specs
...
Previously, we were relying on `__init__`'s arguments to recreate specs.
Now we do it the proper way, using the dict returned by `__getstate__`
(which may or may not include those arguments).
2012-12-05 23:51:30 -05:00
Matthew Tretter
042bdcefb6
Simplify dynamic spec definitions
...
Use a closure instead of an attribute to store the class attrs.
2012-12-05 23:38:10 -05:00
Matthew Tretter
c45876f95c
Ignore some style errors
2012-12-05 23:16:34 -05:00