Source

lindyjam / splash / views.py

Full commit
from lindyjam.splash.models import SplashImage
from django.shortcuts import render_to_response
from django.template import RequestContext

def index(request):
    random_image = SplashImage.objects.filter(width__lte=500).order_by('?')[0]
    return render_to_response('splash/index.html', 
                              { 'image': random_image },
                              context_instance=RequestContext(request) )