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

Use 'sorl_thumbnail' instead of 'thumbnail' #49

Closed
sveetch opened this issue Mar 29, 2023 · 2 comments
Closed

Use 'sorl_thumbnail' instead of 'thumbnail' #49

sveetch opened this issue Mar 29, 2023 · 2 comments
Labels
Enhancement Feature enhancement

Comments

@sveetch
Copy link
Member

sveetch commented Mar 29, 2023

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 sveetch added the Enhancement Feature enhancement label Mar 29, 2023
@sveetch
Copy link
Member Author

sveetch commented Mar 29, 2023

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
Copy link
Member Author

sveetch commented Apr 3, 2023

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:

sveetch/django-smart-media#10

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

@sveetch sveetch closed this as completed Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature enhancement
Projects
None yet
Development

No branches or pull requests

1 participant