Commit graph

838 commits

Author SHA1 Message Date
Matthew Tretter
c78cbfc089 Discover image generators during lookup
Fixes GH-241
2013-08-14 23:08:40 -04:00
Sean Hayes
d647678c2e Added global boolean to prevent autodiscover() from being called more than once. 2013-08-14 22:55:28 -04:00
Matthew Tretter
bc8fdd7ada Run tests with Django 1.5 2013-07-27 20:50:16 -04:00
Bryan Veloso
144c388689 Merge branch 'release/3.0.3' into develop
* release/3.0.3:
  Bump to 3.0.3.
2013-07-22 10:01:53 -07:00
Bryan Veloso
3be774bbf6 Bump to 3.0.3. 2013-07-22 10:01:20 -07:00
Bryan Veloso
532188bd51 Merge branch 'fix-pending-state' into develop
* fix-pending-state:
  Remove PENDING state
2013-07-22 09:59:08 -07:00
Matthew Tretter
e36290b4ee Woops. It uses the cache if DEBUG is False. 2013-07-17 16:09:02 -04:00
Bryan Veloso
8a709a845c Merge branch 'release/3.0.2' into develop
* release/3.0.2:
  Removing the changelog. Changelogs are hard.
  Bump to 3.0.2.
2013-07-17 11:46:18 -07:00
Bryan Veloso
05ec0c1b33 Removing the changelog. Changelogs are hard. 2013-07-17 11:45:42 -07:00
Bryan Veloso
cae6677994 Bump to 3.0.2. 2013-07-17 11:44:31 -07:00
Matthew Tretter
3444626084 Remove PENDING state
Re: #227
2013-07-16 21:41:10 -04:00
Matthew Tretter
a0c7b3f274 Use == for comparison 2013-07-16 20:40:48 -04:00
Matthew Tretter
f684b4e4e0 Merge branch 'fix-234' into develop 2013-07-16 20:36:36 -04:00
Matthew Tretter
14939faef6 Don't mutate __dict__ 2013-07-13 17:13:58 -04:00
Matthew Tretter
3c04cb852f Don't require source in __setstate__; fixes #234 2013-07-13 17:12:55 -04:00
Matthew Tretter
db6cfcb6ce Add (failing) test for #234 2013-07-13 16:38:49 -04:00
Matthew Tretter
637af70921 Don't include cache in serialization of backend
Fixes #227
2013-06-20 09:17:12 -04:00
Rich Leland
ada883c99f Fixed name of spec id attr 2013-06-13 17:41:30 -04:00
Bryan Veloso
ef05e23b66 Merge branch 'release/3.0.1'
* 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
2013-06-11 14:08:38 -07:00
Bryan Veloso
90e9d314a6 Bump version to 3.0.1. 2013-06-11 14:08:23 -07:00
Matthew Tretter
bb7e9e5891 Fix cache backend fallback
Closes #225
Closes #226
2013-06-10 18:33:22 -04:00
Matthew Tretter
01a6c555a1 Fix LazyImageCacheFile.__repr__ and __str__
Using SimpleLazyObject also lets us clean things up a bit.

Closes #218
2013-06-04 23:35:46 -04:00
Matthew Tretter
3001069254 Test stringification of LazyImageCacheFiles 2013-06-04 23:35:46 -04:00
Jacob Magnusson
654867c3cf PEP 3110 compat 2013-06-04 21:42:03 -04:00
Jacob Magnusson
6582794408 Remove unused imports 2013-06-04 21:41:52 -04:00
Matthew Tretter
d3882c34b2 Update installation directions; closes #223 2013-06-04 21:37:06 -04:00
Bryan Veloso
02cd1bf7ff I, for one, welcome our new @matthewwithanm overlords. 2013-06-03 12:50:20 -07:00
Matthew Tretter
af73a93953 Add import to example
Closes #224
2013-06-03 10:31:57 -03:00
Bryan Veloso
0e41675d1c Merge branch 'release/3.0.0'
* 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
  ...
2013-05-30 00:36:46 -07:00
Bryan Veloso
0e0240085f Bump the version number to 3.0.0. 2013-05-30 00:33:10 -07:00
Matthew Tretter
09eea6edf6 Merge pull request #222 from IlyaSemenov/develop
Fixed thumbnail template tag treating provided sizes as strings, not integers
2013-05-29 18:43:04 -07:00
Matthew Tretter
33b8913031 Merge branch 'source-signal-cleanup' into develop 2013-05-29 21:41:44 -04:00
Ilya Semenov
761dcd20ae Fixed thumbnail template tag treating provided sizes as strings, not integers 2013-05-25 16:45:40 +07:00
Matthew Tretter
f9d91c7c4d Remove source_deleted signal
...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.
2013-05-25 00:50:59 -04:00
Matthew Tretter
535e68aea6 Don't send source_saved when no source
Fixes #214 and the failing test from 404fed5
2013-05-25 00:19:14 -04:00
Matthew Tretter
404fed58ec Add failing test for source_save signal w/o source
This is like the test contributed by @saulshanabrook in #214, but
catches the bug closer to its source. (A more unit-y unit test.)
2013-05-25 00:07:58 -04:00
Matthew Tretter
c6a0a13c45 Test that source_saved is dispatched for new instance 2013-05-25 00:04:26 -04:00
Matthew Tretter
a6ef72027b Make test less verbose 2013-05-25 00:04:26 -04:00
Matthew Tretter
4ff55724dc Separate source group tests; signal counting util 2013-05-25 00:04:22 -04:00
Matthew Tretter
397a79ba56 Combine source_created and source_changed
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.
2013-05-24 23:21:30 -04:00
Matthew Tretter
0d5bfe3751 Define NullHandler for Python <= 2.6
Closes #219
2013-05-20 19:19:13 -04:00
Matthew Tretter
80008aee11 Merge pull request #215 from saulshanabrook/patch-5
pass in upscale keyword to thumbnail template tag
2013-05-20 16:09:05 -07:00
Matthew Tretter
32522114db Improve default cache backend handling 2013-05-13 21:28:41 -04:00
Saul Shanabrook
6023e9216a pass in upscale keyword to thumbnail template tag 2013-05-11 09:12:29 -03:00
Matthew Tretter
34739819aa Fix None checks
Files can be falsy
2013-05-10 04:43:01 -04:00
Matthew Tretter
c89b18aa95 Split before_access into two signals
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.
2013-05-10 04:39:46 -04:00
Matthew Tretter
6db082bca2 Reset content pointer 2013-05-10 03:08:43 -04:00
Matthew Tretter
906fbbd463 Reduce calls to backend
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).
2013-05-10 02:56:44 -04:00
Matthew Tretter
bc49f9cf8b Store the file after we generate it
This means reading ImageCacheFiles won't result in an additional storage
operation.
2013-05-10 02:42:28 -04:00
Matthew Tretter
06dd238993 Store cachefile strategy on file; not generator
The file can appeal to the generator for the value, but it shouldn't
require it; it just does that as a convenience.
2013-05-10 00:51:47 -04:00