{% if object.book_set.exists %}
<ul style="list-style: none; padding: 0; display: flex; gap: 10px;">
{% for book in object.book_set.all %}
- <li>
- <a href="{{ book.get_absolute_url }}">
- <img src="{{ book.cover.url }}?{{ object.etag }}" alt="{{ book }}">
- </a>
- </li>
<li>
<a href="{{ book.get_absolute_url }}" title="{{ book }}">
<img src="{{ book.cover.url }}?{{ object.etag }}" alt="{{ book }}">
if not request.accepts('text/html') and request.accepts('application/json') or request.GET.get('format') == 'json':
return JsonResponse({
+ 'title': img.title,
+ 'author': img.author,
+ 'license_name': img.license_name,
+ 'license_url': img.license_url,
+ 'source_url': img.source_url,
'attribution': img.attribution,
'cut_left': img.cut_left,
'cut_right': img.cut_right,