Matthew Tretter
0ec6067c8d
Correct pickling/unpickling of dynamic specs
...
Previously, __reduce__ was returning a reduction of the class, not the
instance.
2012-12-05 21:10:36 -05:00
Matthew Tretter
7f11f44c67
Special case source_file for specs
...
It was already special. Why hide it? Closes #173
2012-12-05 21:10:31 -05:00
Matthew Tretter
afc5900db6
Support decorator syntax for register.spec
2012-12-05 21:09:10 -05:00
Matthew Tretter
956601b5d0
Revert register.spec argument order
...
Since we got rid of inner Config classes, we can put the order back and
support decorators.
2012-12-05 21:09:10 -05:00
Matthew Tretter
a07bc49a25
Remove inner Config classes
2012-12-05 21:09:10 -05:00
Matthew Tretter
4f7ce68904
Add documentation for generateimage
2012-12-03 21:11:52 -05:00
Matthew Tretter
4f81e14f58
Re-add html attribute handling
2012-12-03 21:06:15 -05:00
Matthew Tretter
848d7d7fa3
Add TODOs
2012-12-01 23:19:45 -05:00
Matthew Tretter
14d2193f8d
Remove unused args
2012-12-01 22:23:25 -05:00
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
7ed404f096
Switch args back to old order
2012-12-01 20:45:34 -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
Eric Eldredge
e0567e8fa7
Remove specs.SpecRegistry; add registry module
...
The registry module splits the work that specs.SpecRegistry
used to do into two classes: GeneratorRegistry and
SourceGroupRegistry. These two registries are wrapped in
Register and Unregister utilities for API convenience.
2012-12-01 17:16:09 -05:00
Matthew Tretter
d253fe281a
Rename image_field argument; closes #158
2012-12-01 16:46:10 -05:00
Matthew Tretter
54baa44900
Require spec id for form fields
...
Closes #163
2012-12-01 15:56:37 -05:00
Matthew Tretter
4ead0b3002
Add note about nested config classes
2012-12-01 15:51:40 -05:00
Matthew Tretter
5b1c5f7b4e
Rename source objects to source groups
2012-12-01 15:51:28 -05:00
Matthew Tretter
49a55d4763
Try adding __reduce__
2012-12-01 14:11:04 -05:00
Matthew Tretter
5a414a3644
Rename spec_args to spec_attrs
2012-11-06 23:50:23 -05:00
Matthew Tretter
aaa823afd6
Add flake8 linting
2012-11-05 23:34:32 -05:00
Matthew Tretter
c752eea6a0
Fix bug with black mat_color
2012-11-05 22:23:29 -05:00
Matthew Tretter
f9e2ce8649
Add TODO
2012-11-03 00:27:03 -04:00
Matthew Tretter
5494ee7fc1
Clarify relationship between BaseImageSpec and ImageSpec
2012-11-03 00:08:47 -04: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
56f8d1b8bc
Create form field class; re: #163
2012-10-25 22:46:28 -04:00
Matthew Tretter
6377f89e85
IKContentFile must have name attr
2012-10-25 22:43:10 -04:00
Matthew Tretter
570e7bd640
Simplify SpecHost creation
2012-10-25 22:31:37 -04:00
Matthew Tretter
76b9ebbab4
Omit missing kwargs so as not to override defaults
...
The default image cache strategy was being overridden, which prevented
images from being generated.
2012-10-25 22:25:18 -04:00
Matthew Tretter
006ff54fa8
Clean up version meta.
2012-10-25 20:01:26 -04:00
Matthew Tretter
fb8c411f75
Create new cache warming command
...
Replaces ikcachevalidate and ikcacheinvalidate, and uses the "sources"
abstraction. Closes #165
2012-10-24 23:41:05 -04:00
Matthew Tretter
84f3b6475b
Add files() generator. Re: #165
2012-10-24 23:41:05 -04:00
Matthew Tretter
adf143edc5
add_source -> add_sources; switch argument order
2012-10-24 22:30:10 -04:00
Matthew Tretter
bdec396180
Support inner Config class for id, sources
...
Closes #164
2012-10-24 22:23:53 -04:00
Matthew Tretter
8d3fcafcd9
Swap argument order for specs.register
...
This will allow us to put the id in the inner Meta class.
2012-10-24 22:14:45 -04:00
Matthew Tretter
d110b82347
Rename imagekit_tags to imagekit
2012-10-21 17:59:56 -04:00
Matthew Tretter
3dbb96ea40
Remove unused imports
2012-10-21 17:57:53 -04:00
Matthew Tretter
3e2c3803ff
No need to call spec; the registry does that
2012-10-20 23:44:26 -04:00
Matthew Tretter
0c4d9738c6
Add TODO
2012-10-20 23:44:13 -04: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
aa91a70e46
Make specs know less about source files
2012-10-20 22:53:55 -04:00
Matthew Tretter
e796b4cc61
Create ImageSpec subclasses
...
Since the `ImageSpec` constructor will be accepting keyword arg hints,
it can no longer accept the properties.
2012-10-20 22:15:25 -04:00
Matthew Tretter
b0b466618f
Separate two forms of tag; support additional html attrs
...
Closes #154
2012-10-17 23:41:34 -04:00
Matthew Tretter
770a8cebf4
Fix iteration error
2012-10-17 21:35:19 -04:00
Matthew Tretter
e300ce36a4
Use new registry name
2012-10-17 21:25:19 -04:00
Matthew Tretter
4f52e401d2
Handle null format
2012-10-17 21:24:57 -04:00