Saturday, March 6, 2010

Programmer - DJANGO ImageKit Functionality

Programmer Question

I'm putting together a very basic time-lapse sequence of images (about 120 images total).



I've installed imagekit, adjusted the specs.py file to my needs, populated the database with "pointers", imagekit has generated thumbnails.....all is well.



my views.py includes:



def pics(request):
p = Photo.objects.all()
return render_to_response('Shots.html',
{'p': p})


my Shots.html includes



{% for p in p %}
<tr>
<td>
<img src="{{ p.thumbnail_image.url }}" alt="p.name">
</td>
</tr>
{% endfor %}


However, this alone is impractical as I want the original (larger) size image to display when the cursor is placed on its thumbnail. I've done this before using "onmouseover" with JavaScript, of course. I've also done this with CSS image rollover techniques.



Does ImageKit have it's own object/method that would provide such functionality, thus not requiring JavaScript or CSS or is the solution strictly HTML ?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails