Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail tag in Google Appengine #1922

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 7, 2019

  1. improve compatibility of thumbnail tag with remote storage backen…

    …ds (Google Cloud Storage) and filesystem-less deployments (Appengine)
    
    The ``thumbnail`` tag doesn't work on Google Appengine (GAE) without
    these changes -- in that environment, the file system is mounted
    read-only, and as such generated thumbnail images cannot be written to
    it, (even temporarily).
    
    Moreover, the pre-existing check for already-generated thumbnails
    assumed a FileSystemStorage backend, (and indeed went around it); as
    such, thumbnails were regenerated upon every request. These changes
    leverage the file storage backend for this check, for more generalized
    and optimized compatibility.
    
    ---
    
    To note, the thumbnail function is also made to rely more completely on
    the default storage backend when *saving* -- refactoring this block
    slightly -- to simply use ``default_storage.open()``. This features
    compatibility with both remote and local storage backends, without
    additional work.
    
    ---
    
    Finally, this change set updates the AUTHORS file, (in line with
    contribution guidelines).
    jesteria committed May 7, 2019
    Configuration menu
    Copy the full SHA
    ac72f73 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2019

  1. tweak thumbnail() tag to ensure environmental compatibility

    cannot presume even that default_storage.open() and
    TemporaryFile/SpooledTemporaryFile will be enough for PIL image.save;
    rather, necessary to write thumbnail image to memory, first.
    jesteria committed Nov 14, 2019
    Configuration menu
    Copy the full SHA
    fb1b550 View commit details
    Browse the repository at this point in the history