emencia / django-blog-lotus

A weblog application with Django.
https://django-blog-lotus.readthedocs.io/
MIT License
5 stars 1 forks source link

Use 'sorl_thumbnail' instead of 'thumbnail' #49

Closed sveetch closed 1 year ago

sveetch commented 1 year ago

Is your feature request related to a problem? Please describe. Lotus use Smart Media which use Sorl.

Another common thumbnail library is Easy thumbnail which use the templatetag lib name thumbnail than Sorl, they do conflict, the latter one in settings.INSTALLED_APP will have its tag lib loaded. Resulting in error with template which use the tag lib that is not loaded, the argument syntax is different and so it raise exception.

Describe the solution you'd like Use the explicit tag lib name sorl_thumbnail that mirror Sorl thumbnail tag lib. Also add a warning about it for project with Easy thumbnail.

Describe alternatives you've considered We may try to allow for another tag library to be able to choose between Sorl and Easy thumbnail. Or we could just switch to Easy thumbnail if possible.

Additional context This issue has been raised from installing Lotus into a project with CMS and Django filer that stands on Easy thumbnail. It may be something to fix from Smart media.

sveetch commented 1 year ago

It has to be fully checked again but Lotus does not seems to use Sorl thumbnail tag directly, it always use the smart media tag. And smart media does not use sorl tag since it use Sorl programatically. So this should be safe. However Smart media can not be switched easily to Easy thumbnail since it implement the Sorl syntax and expect possible non compatible behavior.

sveetch commented 1 year ago

Lotus is totally safe of 'thumbnail' usage in template and it is the same for smart media which use the sorl tag programmatically. I've created an issue related to this:

https://github.com/sveetch/django-smart-media/issues/10

At least, we need to warn in documentation about this possible issue with easy-thumbnail in project.