maiksprenger / djangocms-oscar

Bridges the gap between django CMS and the Oscar ecommerce framework.
MIT License
38 stars 13 forks source link

{% load thumbnail %} errors /conflict between sorl-thumbnails and easy_thumbnails #7

Open arigbs opened 7 years ago

arigbs commented 7 years ago

@okfish's fork of djangocms-oscar (which fixed the previous issues preventing migration) throws load thumbnail errors arising from conflict between sorl-thumbnails and easy_thumbnails. On a different thread he mentions solving this using django-smart-load-tag. It's not clear how he achieved this though as django-smart-load-tag now throws it's own set of errors.

arigbs commented 7 years ago

This line from the issue (https://github.com/codysoyland/django-smart-load-tag/issues/7) identifies the problem: "I bumped into same problem : implementing a project .....with several 3rd parties applications, one of them relying on 'easy_thumbnails' and another one relying on 'sorl_thumbnail', which causes 'templatetag' clash when using {% load thumbnail %}" , which might also be linked to: https://code.djangoproject.com/ticket/17085

okfish commented 7 years ago

Django-smart-load-tag using is pretty simple. Just add

{% load smart_load %}
{% load thumbnail from easy_thumbnails %}

to templates which wants easy_thumbnails. Default thumbnailer for templates is defined by the order of INSTALLED_APPS dict, AFAIK

arigbs commented 7 years ago

If I were to do that, how would I determine which templates require easy_thumbnails, given there are so many templates to consider? I'm not very clear on that bit.