Compare commits

...

18 commits

Author SHA1 Message Date
Venelin Stoykov
097999f3cf Merge branch 'release/4.0.2'
* release/4.0.2:
  Bump version to 4.0.2
  Do not leak open files after generation
  Fix `ImageCacheFile.__repr__` to not send signals
  Make generateimages support pre Django 1.8 versions
  generateimages: fix taking arguments
  README - use Python 3 print function
  In Python 3 files should be opened as binary
  Fixed #368 use specs directly in ProcessedImageField
2017-11-20 10:28:47 +02:00
Venelin Stoykov
ef45747bf9 Merge branch 'release/4.0.1'
* release/4.0.1:
  stylling and linting fixes to setup.py
  Bump version to 4.0.1
  Cleaned up _autodiscovered flag handling.
  Added huge performance improvement by running imagekit.utils.autodiscover() only once on Django > 1.7 as it was intended.
  Update README.st change model->instance for clarity in defining specs outside of models.
  Improved docs to include example on how to use plain ImageSpec (defined outside of model, not ImageSpecField) with AdminThumbnail.
2017-05-17 18:14:18 +03:00
Venelin Stoykov
acefa913f9 Merge pull request #415 from tyagow/patch-1
Update advanced_usage.rst
2017-04-24 18:20:31 +03:00
Tiago Almeida
33a62b8840 Update advanced_usage.rst
wrong attribute access... probally miss typed..
thumbnail dosent exists so i think its mode.thumbnail_height
2017-04-23 16:25:13 -03:00
Venelin Stoykov
f724cb0118 Merge branch 'release/4.0'
* release/4.0:
  Bump version to 4.0
  Universal wheels!
  Replaces #301 autodiscover works with AppConfig
  Ignore autogenerated CTags file
  Do not try south modelinspector when not needed
  Make it possible to configure IMAGEKIT_CACHE_TIMEOUT
  Test against Django 1.11
  Close the file only if it has been opened locally
  Cleanup caching configuration
  updated readme.rst with a svg badge
  honor post_save's update_fields and only fire the source_saved signal when needed
  Ignore VSCode workspace config files
  Fixed #350: Error when trying to access width/height after url
  Fixes #382: Tests no longer leave junk
  Fixes #379 Support for Django 1.10
  Ignore .idea from git
  Include the test suite in the sourcetarball but do not install it.
  Make travis happy
  Drop support for older Django and Python versions
  Replace Lenna image in tests with a truly free alternative.
  Move compat module outside of templatetags package
  Fix test requirements for django 1.9 and Python3.5
2017-02-22 15:54:07 +02:00
Bryan Veloso
bc93ec2920 Merge branch 'release/3.3'
* release/3.3:
  Add @vstoykov to the author list.
  Bump version number.
  Update django-nose version to work with Django 1.9
  Add a missing env to the tox matrix
  Work a compatibility implementation for Django 1.2
  Tells tox to only run the designated env
  Enable the new travis architecture for speed and reliability
  Allow the test to fail fast
  Allow travis to fail for the python3.5 interpreter not yet available
  Use the env conf for travis to split the test builds
  Add tox env for django 1.9
  Update the doc to reflect the new `IMAGEKIT_CACHE_BACKEND` behavior
  Cleaner implementation thanks to @vstoykov explanation
  Handle cases where DEFAULT_CACHE_ALIAS is None in old Django versions
  Do not take a decision on which cache to use in DEBUG mode
  Use a compat method to wrap the new way of retrieving the cache engine
2015-12-08 11:41:23 -08:00
Bryan Veloso
96f0b5da4d Merge branch 'release/3.2.7'
* release/3.2.7:
  Bump the version to 3.2.7.
  Fixes open cache file never getting closed
  Fixes open source file never getting closed
  Do not use progressive when we are not running in terminal
  Add test environments for Python3.4 and Django1.7 and Django1.8
  Fixes imports in README example for ProcessedImageField
2015-08-23 18:02:32 -07:00
Bryan Veloso
b398c2cee4 Merge branch 'release/3.2.6'
* release/3.2.6:
  Bump the version to 3.2.6.
  Updated importlib import to fix DeprecationWarning (for django 1.8)
  Add note about usage of optimistic strategy with async backend
  Fix typo
2015-02-26 10:28:51 -08:00
Bryan Veloso
2bcb93da22 Merge branch 'release/3.2.5'
* release/3.2.5:
  Bump the version to 3.2.5.
  Explicitly setting serializer for celery task
2015-01-05 15:58:47 -08:00
Bryan Veloso
00b4095e40 Merge branch 'release/3.2.4'
* release/3.2.4:
  Bump the version to 3.2.4.
  Deprecate `imagekit.processors` submodules
  Catch autodiscover module import error
2014-09-28 13:23:46 -07:00
Bryan Veloso
bc0b0a8a75 Merge branch 'release/3.2.3'
* release/3.2.3:
  Bump the version to 3.2.3.
  Exclude tests from dist
  Revert "Remove test dir __init__.py"
  Only include fetched fields in initial hash of sources
  Add test to illustrate GH-295
  Test that there isn't IO done when you get a URL
  Support should_verify_existence on strategies
  Test that Optimistic strategy doesn't cause reads
  Ignore my Python3 virtualenv
  Remove test dir __init__.py
  Fixed minor spelling error in README.rst
2014-09-27 22:21:17 -07:00
Bryan Veloso
b176c0cafe Merge branch 'release/3.2.2'
* release/3.2.2:
  Bump version to 3.2.2.
  Make sure image files has a name associated.
2014-07-14 12:24:13 -07:00
Bryan Veloso
9f69d7e056 Merge branch 'release/3.2.1'
* release/3.2.1:
  Bump the version to 3.2.1.
  Simplified RQ cache file backed by using the job decorator
  Add note about `open()`
  Always call variable "source_file"
  setup.py: added 'async_rq' extra, django-rq dependency
  Removed unneeded django_rq import
  Added a DeprecationWarning if Async cache file backend is used
  Updated tox.ini to test against Django 1.6.
  Fixed #266 -- Simplified (and renamed) StrategyWrapper.
  Link to Instakit.
2014-04-04 09:27:30 -07:00
Bryan Veloso
ab3593ed54 Merge branch 'release/3.2'
* release/3.2:
  Bump the version to 3.2.
  Use signal.connect for backwards compat
  Add Venelin Stoykov to AUTHORS
  Improve logic of contributing ImageSpecFields to Models
  Use force_bytes from imagekit.lib in test_cachefiles
  Remove @vstoykov's note. Seems like the right place to me (:
  Move force_bytes into lib module
  Don't use a raw string with \u escapes
  Fix sanitizing cache key under Python 3
  Add module to sys.modules
  Test for Python 3
  Insert importer at beginning of list
  Delay Django import until needed
  Add Python 3 suport and drop support for Python 2.5
2014-01-01 15:18:38 -08:00
Bryan Veloso
a14fc91c8d Merge branch 'release/3.1'
* release/3.1:
  Tagging 3.1.
  Correct reference to generateimage tag
  Fix celery backend
  Cache file backends: dropped the "Async" in class names
  Added RQ-based async cache file backend
2013-12-20 09:19:40 -08:00
Bryan Veloso
6929128180 Merge branch 'release/3.0.4'
* release/3.0.4:
  Bump the version to 3.0.4.
  Add __getstate__ method to ImageCacheFile
  Update IMAGEKIT_DEFAULT_FILE_STORAGE description
  Discover image generators during lookup
  Added global boolean to prevent autodiscover() from being called more than once.
  Update fields.py
  Run tests with Django 1.5
2013-09-26 10:56:30 -07:00
Bryan Veloso
a9a152cdfa Merge branch 'release/3.0.3'
* release/3.0.3:
  Bump to 3.0.3.
  Woops. It uses the cache if DEBUG is False.
  Remove PENDING state
2013-07-22 10:01:26 -07:00
Bryan Veloso
31eab7666a Merge branch 'release/3.0.2'
* release/3.0.2:
  Removing the changelog. Changelogs are hard.
  Bump to 3.0.2.
  Use == for comparison
  Don't mutate __dict__
  Don't require source in __setstate__; fixes #234
  Add (failing) test for #234
  Don't include cache in serialization of backend
  Fixed name of spec id attr
2013-07-17 11:46:07 -07:00

View file

@ -90,7 +90,7 @@ for getting this information.
@property @property
def processors(self): def processors(self):
model, field_name = get_field_info(self.source) model, field_name = get_field_info(self.source)
return [ResizeToFill(model.thumbnail_width, thumbnail.avatar_height)] return [ResizeToFill(model.thumbnail_width, model.thumbnail_height)]
register.generator('myapp:profile:avatar_thumbnail', AvatarThumbnail) register.generator('myapp:profile:avatar_thumbnail', AvatarThumbnail)