Commit graph

235 commits

Author SHA1 Message Date
Bryan Veloso
a004071e27 We're in 2.0alpha now, really. 2012-02-14 11:18:36 -08:00
Timothée Peignier
98066eea93 fix import and formatting 2012-02-14 17:34:51 +01:00
Matthew Tretter
3a3f941e2c Pull field utilities out into their own module 2012-02-13 21:47:53 -05:00
Matthew Tretter
8cdbd96a1f Add files module 2012-02-13 21:44:29 -05:00
Matthew Tretter
c2891090d1 Remove old handlers
They somehow got re-added along the way
2012-02-13 21:38:40 -05:00
Matthew Tretter
b71102e7e8 Correct indentation error 2012-02-13 21:16:45 -05:00
Matthew Tretter
e71432d8ed Undo "return content" removal
I changed my mind. For now, at least.
2012-02-12 17:23:55 -05:00
Matthew Tretter
e31080ff4a Moved SpecFileGenerator to new module 2012-02-12 17:23:53 -05:00
Matthew Tretter
d9abd75d8a Pass storage to generator 2012-02-12 17:23:40 -05:00
Matthew Tretter
ff1b76f923 Remove image cache backend from generator 2012-02-12 17:23:40 -05:00
Matthew Tretter
a668b28257 Fix ProcessedImageField bug
Was using an old method signature
2012-02-12 17:23:40 -05:00
Matthew Tretter
b24fe7b8e0 Cleanup 2012-02-12 17:23:40 -05:00
Matthew Tretter
2a422f5cb6 Decouple generator from model 2012-02-12 17:23:39 -05:00
Matthew Tretter
1054d055fb Rename generate_content to process_content 2012-02-12 17:23:39 -05:00
Matthew Tretter
a7cf79290c Don't return content 2012-02-12 17:23:39 -05:00
Matthew Tretter
4ab5aadec6 Remove process method 2012-02-12 17:23:39 -05:00
Matthew Tretter
146a5ee01c Access generator through field 2012-02-12 17:23:39 -05:00
Matthew Tretter
7d6036aaac Remove cache_to from generator 2012-02-12 17:23:39 -05:00
Matthew Tretter
71c56c7d6a Separate generator 2012-02-12 17:23:39 -05:00
Matthew Tretter
fe1bfa4d1a Fix conflict resolution issues 2012-02-12 17:06:37 -05:00
Bryan Veloso
424659bd07 Merge pull request #95 from jdriscoll/new_processors
New processors
2012-02-12 13:54:12 -08:00
Bryan Veloso
5a31e98b2f Merge remote-tracking branch 'matthewwithanm/whencontrol' into develop
* matthewwithanm/whencontrol:
  Rename cache_state_backend to image_cache_backend
  Add NonValidatingCacheStateBackend
  Some documentation
  Only invalidate spec file if source changes
  Rename DefaultCacheStateBackend
  generate method (optionally) saves file
  Rename force flag to force-revalidation
  Add clear method for when future validation is unwanted
  Commands for validating and invalidating the cache
  Fix var name typo
  Spec files now accessible through _ik attr
  Remove unused import
  First shot at cache state backend implementation

Conflicts:
	imagekit/models/fields.py
2012-02-12 13:48:02 -08:00
Matthew Tretter
e9e364eedd Rename cache_state_backend to image_cache_backend
Related names (like the package and class names) have also been
updated.
2012-02-12 16:18:34 -05:00
Matthew Tretter
2838fa47cd Created "fields" module
This should give us a little more structure as IK grows.
2012-02-12 14:53:49 -05:00
Matthew Tretter
cf821cfecd Documentation 2012-02-11 15:40:16 -05:00
Matthew Tretter
80a26a4f09 Rename crop function to show it's internal 2012-02-11 15:33:25 -05:00
Matthew Tretter
4278a95001 Use BasicCrop in other processors 2012-02-11 15:32:23 -05:00
Matthew Tretter
51212749e9 Improve BasicCrop API as discussed in #94 2012-02-11 15:28:47 -05:00
Matthew Tretter
15e0981835 Use BasicResize for resizing 2012-02-11 15:26:27 -05:00
Matthew Tretter
1a999f23da @madisvain's BasicResize from #94 2012-02-11 15:25:10 -05:00
Matthew Tretter
75db5db073 Default anchor to CENTER
This was accidentally lost in 88cda1b0b3.
2012-02-11 15:16:28 -05:00
Matthew Tretter
57056c021d Add SmartFill processor
The simplicity is what makes it so attractive.
2012-02-11 15:12:24 -05:00
Matthew Tretter
ce7353b0bd Extract Cover processor from Fill
This will also be used by `SmartFill`, so we might as well centralize it.
2012-02-11 15:01:59 -05:00
Matthew Tretter
88cda1b0b3 Clean up Crop processor
Also, finally allowing arbitrary anchors (specified in percentages).
2012-02-11 14:52:43 -05:00
Matthew Tretter
b4b64a4863 Avoid duplication of cropping code
`Fill` is just a resize followed by a crop, so we might as well make
use of the processors we already have.
2012-02-11 14:25:06 -05:00
Matthew Tretter
16110a0f1c Remove print statement 2012-02-11 14:13:57 -05:00
Matthew Tretter
1ffc8ca81e Remove duplicate resize.Crop
`resize.Crop` actually hasn't been moved to `crop.Crop` (as the removed
class claimed). In fact, what used to be called `resize.Crop` is now
`resize.Fill`. The confusion is understandable, since it's what
motivated the change in the first place!
2012-02-11 14:11:07 -05:00
Madis Väin
6dd0d2272f write the processors talked about in issue #93 2012-02-11 13:50:12 -05:00
Matthew Tretter
2467dfe912 Rename resize.Crop to resize.Fill 2012-02-11 13:36:30 -05:00
Matthew Tretter
c3ef5172c3 Rename ImageSpec to ImageSpecField
The ImageSpec class remains for now, but using it throws
deprecation warnings.
2012-02-11 13:06:48 -05:00
Matthew Tretter
15b15afe2c Add NonValidatingCacheStateBackend 2012-02-11 00:42:56 -05:00
Matthew Tretter
164a4e11fc Some documentation 2012-02-11 00:15:58 -05:00
Matthew Tretter
1956e16b4b Only invalidate spec file if source changes 2012-02-11 00:04:56 -05:00
Matthew Tretter
60a8c06336 Rename DefaultCacheStateBackend
PessimisticCacheStateBackend more accurately describes what is is,
instead of how it's used.
2012-02-10 22:08:13 -05:00
Matthew Tretter
c2a4d01b7c Only one return 2012-02-10 22:04:20 -05:00
Matthew Tretter
09b97ee62f Move SmartCrop to crop module
Addresses one of the issues raised by in @madisvain in #93
2012-02-10 19:42:36 -05:00
Jan Sagemueller
a041302c96 Resize processor: Add mat_color option to enforce the targeted image size 2012-02-08 09:25:37 -05:00
Matthew Tretter
35b807cfa9 generate method (optionally) saves file
This way, there's a creation counterpart to `delete()`. The user
shouldn't have to deal with storage backends to create and delete the
files, and now they don't.
2012-02-03 09:16:50 -05:00
Matthew Tretter
513b23b169 Rename force flag to force-revalidation 2012-02-02 23:23:20 -05:00
Matthew Tretter
011c0c2e5f Add clear method for when future validation is unwanted 2012-02-02 23:21:00 -05:00