summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/utils/views.py2
-rw-r--r--design/templates/admin/insert_images.html10
2 files changed, 6 insertions, 6 deletions
diff --git a/app/utils/views.py b/app/utils/views.py
index 8351ae9..87a69bf 100644
--- a/app/utils/views.py
+++ b/app/utils/views.py
@@ -87,7 +87,7 @@ def insert_image(request):
"""
images = LuxImage.objects.all()[:80]
videos = LuxVideo.objects.all()[:10]
- audio = Audio.objects.all()[:40]
+ audio = LuxAudio.objects.all()[:40]
object_list = sorted(
chain(images, videos, audio),
key=lambda instance: instance.pub_date,
diff --git a/design/templates/admin/insert_images.html b/design/templates/admin/insert_images.html
index 6b69a68..cecfeee 100644
--- a/design/templates/admin/insert_images.html
+++ b/design/templates/admin/insert_images.html
@@ -83,11 +83,11 @@ function openInNewTab(url) {
</figure>
<ul class="actions">{%if object.get_type == "LuxVideo" %}
<li><a data-is-video="true" data-video-mp4="{{object.video_mp4.url}}" data-video-webm="{{object.video_webm.url}}" data-id="{{object.id}}" data-class="vid" data-poster="{{object.video_poster.url}}" onclick="insertImage(this);return false;" class="insert" href="#">Insert video</a>{%else%}
- <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picwide" onclick="insertImage(this);return false;" href="#" >full width</a></li>
- <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picwide" data-caption="true" onclick="insertImage(this);return false;" href="#">full width cap</a></li>
- <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="cluster pic66" onclick="insertImage(this);return false;" href="#">cluster</a></li>
- <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picfull" onclick="insertImage(this);return false;" href="#">column width</a></li>
- <li><a data-src="{% get_image_by_size object 'admin_insert' %}" data-id="{{object.id}}" data-class="picfull" data-caption="true" onclick="insertImage(this);return false;" href="#">column width cap</a></li>
+ <li><a data-src="{% get_image_by_size object 'tn' as tn %}" data-id="{{object.id}}" data-class="picwide" onclick="insertImage(this);return false;" href="#" >full width</a></li>
+ <li><a data-src="{{tn}}" data-id="{{object.id}}" data-class="picwide" data-caption="true" onclick="insertImage(this);return false;" href="#">full width cap</a></li>
+ <li><a data-src="{{tn}}" data-id="{{object.id}}" data-class="cluster pic66" onclick="insertImage(this);return false;" href="#">cluster</a></li>
+ <li><a data-src="{{tn}}" data-id="{{object.id}}" data-class="picfull" onclick="insertImage(this);return false;" href="#">column width</a></li>
+ <li><a data-src="{{tn}}" data-id="{{object.id}}" data-class="picfull" data-caption="true" onclick="insertImage(this);return false;" href="#">column width cap</a></li>
<li><a onclick='openInNewTab("/admin/photos/luximage/{{object.pk}}/change/");' href="#">Edit Image</a></li>{%endif%}
</ul>
{% else %}