mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-17 05:40:25 +00:00
In the old IK API, processors (like `Transpose`) were able to access the file by inspecting the model instance (which carried an options object that specified the attribute name of the ImageField from which the file could be extracted). Since the new API allows for multiple ImageFields (and because IKOptions have been removed), it became necessary to provide more information. Initially, this was accomplished by passing the spec to `process()`, however with the addition of ProcessedImageField, it became clear the a cleaner solution was to pass only the field file (ImageSpecFile or ProcessedImageFieldFile). This keeps the ORM stuff (fields, etc.) out of the `ImageProcessor` API but (because field files, not just regular files, are passed) the average hacker can still have their processor make use of model information by accessing the model through the file's `instance` property. |
||
|---|---|---|
| .. | ||
| management | ||
| templates/imagekit/admin | ||
| __init__.py | ||
| fields.py | ||
| lib.py | ||
| processors.py | ||
| tests.py | ||
| utils.py | ||