1. Chris Moffitt
  2. satchmo
  3. Issues
Issue #1283 resolved

Update to sorl-thumbnail v11

Anonymous created an issue

The examples for sorl-thumbnail v11.01 use a "endthumbnail" closing tag for the template tags, current this is not compatible with the current version of satchmo

eg: {{{ {# http://thumbnail.sorl.net/examples.html #}

{% thumbnail item.image "100x100" crop="center" as im %} <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"> {% endthumbnail %} }}}

Comments (13)

  1. Hynek Cernoch

    ringemup,
    What is the advantage of sorl upgrade? What is better on sorl-thumbnail v11?

    Problem of this is that users would have to upgrade at the same time Satchmo, Sorl-thumbnail and rewrite their customized templates. Sorl has no intermediate backword or forward compatible solution. All changes would have to be done at the same time.

    I thing that the disadvantages would outweigh the possible benefit now.

  2. ringemup

    Well, the main advantage I see is being able to integrate with existing sites that are already using the newer Sorl Thumbnail (as mine is, and I'm sure an increasing number of other people's will be). It would have been much more difficult for me to downgrade the rest of my site to the old thumbnail library than to do a search through a few directories for "{% thumbnail" and add some quotes to the dimensions and paste in some "{% endthumbnail %}" tags.

    But as for actual advantages of the new version:

    • The new version also supports the "empty" option for the thumbnail tag, the is_portrait filter, and the margin filter, which are all somewhere between handy and crucial for designers.
    • It has an AdminImageMixin that automatically shows you an image thumbnail on the change form.
    • It supports dummy images for dealing with development environments without having to copy down all images from the production environment.
    • It supports non-local file storage.
    • It can use pgmagick or ImageMagick instead of PIL, the latter of which can be an immense pain in the rear to get installed properly in some environments.
  3. Jason Buckner

    Sorry, I should've posted issue #1378 here instead of creating a new one.

    One idea I had that I think would be useful for site owners to upgrade would be a script that can automate (or at least help them identify) where they're going to have to make changes. I'll put some thought into how this would work.

  4. Hynek Cernoch
    • changed status to open

    Finally, Satchmo 0.9.2 beta is a good time for this upgrade. :-)

    Jason,
    please submit upgraded templates and prepare an example of such script. I'm willing to implement your solution to the new satchmo_check.

  5. Log in to comment