* release/3.0.1:
Bump version to 3.0.1.
Fix cache backend fallback
Fix LazyImageCacheFile.__repr__ and __str__
Test stringification of LazyImageCacheFiles
PEP 3110 compat
Remove unused imports
Update installation directions; closes#223
I, for one, welcome our new @matthewwithanm overlords.
Add import to example
* release/3.0.0: (302 commits)
Bump the version number to 3.0.0.
Fixed thumbnail template tag treating provided sizes as strings, not integers
Remove source_deleted signal
Don't send source_saved when no source
Add failing test for source_save signal w/o source
Test that source_saved is dispatched for new instance
Make test less verbose
Separate source group tests; signal counting util
Combine source_created and source_changed
Define NullHandler for Python <= 2.6
Improve default cache backend handling
pass in upscale keyword to thumbnail template tag
Fix None checks
Split before_access into two signals
Reset content pointer
Reduce calls to backend
Store the file after we generate it
Store cachefile strategy on file; not generator
Add cachefile backend fallback
Use pilkit's process_image utility
...
...for now. Eventually, we will want a signal that tells us when sources
are no longer used, however that isn't just limited to when they're
deleted! This new signal should also be dispatched, for example, when
a source image field is set to `None`. Since none of the built-in
strategies are currently using the source_deleted signal, I've decided
to remove it until we have a more complete solution.
As discussed in #214, source_created and source_changed didn't really
have clear definitions. In truth, their names and separation betray
their origins as model receivers in earlier versions. The "source group"
abstraction helped us get away from thinking about things exclusively in
terms of models, but these remained as an artifact.
Differentiating between when the generated file content is required and
when the generated file is just required to exist gives us more
flexibility with strategies.
Reading from an `ImageCacheFile`, will result in accessing its `file`
attribute repeatedly which would result in the `before_access` signal
being dispatched, which in turn would result in many unnecessary calls
to the image cache backend. With this change, we don't send
`before_access` if the file has already been created.
Similarly, we don't need to try to generate the image if we know for
certain that it's already been generated (because we have a reference
to it).