Matthew Tretter
8044b97a33
Extract suggest_extension util from generator
2012-04-19 21:33:52 -04:00
Matthew Tretter
6e4a8d1b58
Woah, globals
2012-04-09 21:27:09 -04:00
Clay McClure
db4df4f82c
Add SpecFile.__unicode__
...
SpecFile is based after django.core.files.base.ContentFile, which lacks a __unicode__
method. This leads to an AttributeError when SpecFile.__repr__ is called. This is
easily resolved by giving SpecFile a proper __unicode__ method.
2012-03-27 17:17:54 -04:00
Bryan Veloso
70f80ba7fa
Bumping an version number.
2012-03-23 14:32:52 -07:00
Bryan Veloso
1c8987e353
Merge pull request #121 from cyberdelia/celery-improvements
...
Delete file before re-generating it
2012-03-23 13:04:22 -07:00
Timothée Peignier
39b2feda5a
delete file before re-generating it to avoid ill named file
2012-03-23 12:13:53 +01:00
Timothée Peignier
bc7852be21
fix typo in celery backend
2012-03-20 20:06:41 +01:00
Bryan Veloso
c46a403baa
Using Django's method of versioning. Also updating the docs' version.
2012-03-20 02:44:53 -07:00
Timothée Peignier
d1af56ba3e
ensure task is correctly created
2012-03-15 10:37:28 +01:00
Timothée Peignier
1e4ac109f7
rename async to celery
2012-03-08 19:58:36 +01:00
Timothée Peignier
7af4940914
try to import celery on init
2012-03-05 17:47:19 +01:00
Timothée Peignier
f3976a5c68
change import path
2012-03-05 17:36:08 +01:00
Timothée Peignier
983bceff62
rename CeleryCacheStateBackend as CeleryImageCacheBackend
2012-03-05 17:00:35 +01:00
Timothée Peignier
9fbdd7bef4
import base backends in imagecache module
2012-03-05 16:55:40 +01:00
Timothée Peignier
0fa86f7da8
rename celery module to async
2012-03-05 13:58:09 +01:00
Timothée Peignier
42c79d7bb2
declare celery backends in a separate module
2012-03-05 12:27:53 +01:00
Clay McClure
2cf425d8a3
Wrap ContentFile in a file-like object with a filename and content_type.
...
This extra layer of indirection allows us to tack some attributes
(name and content_type) onto the underlying file, which we cannot
do with a StringIO since it's a native ctype.
These attributes are used by various third-party software that expects
to work with django.core.files.File instances, and not directly with
StringIO instances. By way of example, the django-storages mosso
backend (CloudFilesStorage) looks for a content_type attribute, and
the cloudfiles Object backend looks for a name attribute.
2012-02-29 05:01:31 -05:00
Matthew Tretter
3a5d7da0d8
Validate the image any time the file is required
...
This means that accessing `path` or `size` will also validate,
closing #109
2012-02-23 17:46:57 -05:00
Matthew Tretter
8fc71e689a
Cover renamed to ResizeToCover
2012-02-18 01:38:19 -05:00
Matthew Tretter
e67934852d
Rename processors and clean up packages
2012-02-18 00:20:44 -05:00
Matthew Tretter
3912003f02
Rename Fit and Fill to ResizeToFit and ResizeToFill
2012-02-18 00:05:18 -05:00
Matthew Tretter
5a8564d039
Rename BasicResize to Resize
2012-02-17 23:55:59 -05:00
Matthew Tretter
3fad906305
Remove crop.Crop to avoid confusion with resize.Crop
2012-02-17 23:54:39 -05:00
Matthew Tretter
3e2bd2f21f
Crop processor consolidation
...
BasicCrop is absorbed into Crop and Crop uses ResizeCanvas
2012-02-17 23:22:56 -05:00
Matthew Tretter
a164427074
Don't use Anchor internals; allow any anchor tuple
...
ResizeCanvas now uses the anchor behavior of the Crop processor
2012-02-17 23:22:49 -05:00
Matthew Tretter
568c3d29a1
Default ResizeCanvas color
2012-02-17 22:39:43 -05:00
Matthew Tretter
6cca16ef99
Allow negative coordinates when using an anchor
2012-02-17 22:38:04 -05:00
Matthew Tretter
dd5efac0eb
A little AddBorer cleanup
2012-02-17 22:38:00 -05:00
Matthew Tretter
441266a6d7
Small ResizeCanvas fixes
2012-02-17 22:34:40 -05:00
Jan Sagemueller
b073868bb7
AddBorder, Anchor, and ResizeCanvas processors
...
[NEW] Processors: AddBorder
[NEW] Processors: Anchor has now its own class, taken from Crop
[CHG] Processors: Renamed Mat => ResizeCanvas, and will now use either
an anchor from Anchor or a user defined pixel offset
2012-02-17 21:48:32 -05:00
Jan Sagemueller
09ecbae143
Resize processor: Externalized transparency padding into new class Mat
...
Conflicts:
imagekit/processors/resize.py
2012-02-17 21:47:24 -05:00
Matthew Tretter
b016065807
Fix inheritance of ImageKitMeta objects
...
Fixes #100
2012-02-17 21:10:09 -05:00
Matthew Tretter
84d36791b8
Pass the pickle test; should fix #97
2012-02-17 20:07:50 -05:00
Matthew Tretter
677c52b730
Rename descriptor and file to match Django
2012-02-17 18:39:51 -05:00
Matthew Tretter
6816196da7
Use "super"
2012-02-17 18:22:05 -05:00
Eduard Iskandarov
fa244cdcc9
fix unicode error
2012-02-16 19:47:22 +06:00
Bryan Veloso
dafbe2040d
The serial must be greater than 0 for an alpha release. Fixes #101 . Thanks @vesterbaek!
2012-02-15 12:57:36 -08:00
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
938acedcc7
Decorator syntax for registering specs
2012-02-13 22:13:32 -05:00
Matthew Tretter
722a553501
Automatically autodiscover
2012-02-13 22:12:34 -05:00
Matthew Tretter
d275aaa3f7
A little reorganization
2012-02-13 22:12:07 -05:00
Matthew Tretter
807beef418
Centralized spec properies
2012-02-13 21:49:09 -05:00
Matthew Tretter
6a1a22825b
Working proof of concept of spec tag
2012-02-13 21:49:09 -05: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
Matthew Tretter
8b6ba687e4
Commands for validating and invalidating the cache
2012-02-02 00:19:46 -05:00
Matthew Tretter
c4fc09c688
Fix var name typo
2012-02-02 00:08:22 -05:00
Matthew Tretter
a668df1c37
Spec files now accessible through _ik attr
2012-02-01 23:26:39 -05:00
Matthew Tretter
a1638127cf
Remove unused import
2012-02-01 22:41:33 -05:00
Matthew Tretter
62ff07bf1f
First shot at cache state backend implementation
2012-02-01 22:37:58 -05:00
Timothée Peignier
eb801d75f5
small pep8 formatting fix
2012-01-27 13:45:22 +01:00
Matthew Tretter
343f14ad48
Use old-style string formatting
2012-01-26 18:19:39 -05:00
Timothée Peignier
3bac472561
ImageSpec accepts callable processors arg
2012-01-26 11:01:58 -05:00