add images to template thumbnails

This commit is contained in:
Sanjay B 2013-09-04 20:18:31 +05:30
parent 5421eaecbc
commit 291fe9822f
5 changed files with 13 additions and 13 deletions

View File

@ -243,9 +243,9 @@ class ItfModel(models.Model):
try:
thumb = get_thumbnail(imgfield, size, crop="center").url
except:
thumb = ''
thumb = 'http://placehold.it/%s' % size
else:
thumb = '' # Add default image for site
thumb = 'http://placehold.it/%s' % size # Add default image for site
return {
'thumb': thumb
}

View File

@ -145,7 +145,7 @@ $(function() {
{% for group in groups %}
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ group.group.get_main_image.thumb }}" alt="{{ group.group.name }}" />
</div>
<div class="productionEachTextA">
@ -220,7 +220,7 @@ $(function() {
{% for p in productions %}
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.production.get_main_image.thumb }}" alt="{{ p.production.name }}" />
</div>
<div class="productionEachTextA">

View File

@ -142,7 +142,7 @@ $(function() {
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.person.get_main_image.thumb }}" alt="/static/images/150x150.jpg" />
</div>
<div class="productionEachTextA">

View File

@ -122,7 +122,7 @@
{% for p in people %}
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.person.get_main_image.thumb }}" alt="/static/images/150x150.jpg" />
</div>
<div class="productionEachTextA">
@ -149,7 +149,7 @@
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.person.get_main_image.thumb }}" alt="{{ p.person }}" />
</div>
<div class="productionEachTextA">
@ -179,14 +179,14 @@
{% for p in productions %}
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.get_main_image }}" alt="{{ p.name }}" />
</div>
<div class="productionEachTextA">
<div class="orangeInnerRight">{{ p.name }} {% if p.debut_date %} {{ debut_date|date:"Y" }} {% endif %}</div>
<!-- <div>Group: Group Name</div> -->
<div><em>Title Credits: (not implemented)</em></div>
<div>No. of shows: (not implemented)</div>
<!-- <div><em>Title Credits: (not implemented)</em></div>
<div>No. of shows: (not implemented)</div> -->
</div>
<div class="clear"></div>

View File

@ -83,7 +83,7 @@ $(function() {
{% for p in sibling_productions %}
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.get_main_image.thumb }}" alt="{{ p.name }}" />
</div>
<div class="productionEachTextA">
@ -121,7 +121,7 @@ $(function() {
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ p.get_main_image.thumb }}" alt="{{ p.name }}" />
</div>
<div class="productionEachTextA">
@ -157,7 +157,7 @@ $(function() {
{% for r in related_people %}
<div class="productionEach">
<div class="productionEachImg">
<img src="" alt="/static/images/150x150.jpg" />
<img src="{{ r.person.get_main_image.thumb }}" alt="{{ r.person.first_name }} {{ r.person.last_name }}" />
</div>
<div class="productionEachTextA">