django-cropduster icon indicating copy to clipboard operation
django-cropduster copied to clipboard

Add get_thumbs templatetag.

Open ctbarna opened this issue 9 years ago • 5 comments

ctbarna avatar Apr 03 '15 15:04 ctbarna

If we decide this is the way to go, I can write tests for it. In particular for prefetch things.

ctbarna avatar Apr 03 '15 15:04 ctbarna

I'm fine with this (and want One True Image Tag in the end). The only caveat is that some crop sizes have dashes in them and can't appear in the template. We'll want to migrate these to underscores, which is a good idea anyway.

(I will now await the obligatory snarky Jinja comment.)

whatisjasongoldstein avatar Apr 03 '15 15:04 whatisjasongoldstein

I think this is the type of API that we want to move toward eventually but I'm not entirely convinced the future is in the templatetag. @joshmaker envisions a day where the API is something like article.lead_image.thumbs.300.url.

ctbarna avatar Apr 03 '15 15:04 ctbarna

Agreed, if that's possible. It'd be nice to use the API the same way in views and templates, for setting the og:image, etc.

whatisjasongoldstein avatar Apr 03 '15 15:04 whatisjasongoldstein

@ctbarna has this been abandoned in favor of putting the templatetag elsewhere? Or are we still planning to revisit this approach?

fdintino avatar Jun 05 '15 18:06 fdintino