jonasundderwolf / django-image-cropping

Django helper application to easily and non-destructively crop arbitrarily large images in admin and frontend.
Other
553 stars 131 forks source link

Pass easy_thumbnails alias to cropped_thumbnail tag #48

Open rhymes opened 10 years ago

rhymes commented 10 years ago

I understand that it is possible to use easy_thumbnails 'thumbnail' tag instead of 'cropped_thumbnail' like showed here https://django-image-cropping.readthedocs.org/en/latest/#frontend but it would be nice if cropped_thumbnail accepted a registered easy_thumbnails alias too.

Something like

{% cropped_thumbnail yourmodelinstance "ratiofieldname" alias=alias_name %}

See here https://github.com/SmileyChris/easy-thumbnails/blob/master/easy_thumbnails/templatetags/thumbnail.py#L82

anrie commented 10 years ago

Sounds like a good addition. There's already a branch (simple_tag) for simplifying the cropped_thumbnail tag. We should clean that up first, but then it shouldn't be too hard to add the alias option

rhymes commented 10 years ago

@anrie do you think it's doable on master?

I'll have to study the code a little

anrie commented 10 years ago

Hey @rhymes, of course it should be doable. But as we currently rework the template tag for the next release i think it's simply not worth the effort.