
from django.shortcuts import render_to_response
from django.template import RequestContext
from ldt.ldt_utils.models import Content

def home(request):
    
    contents = Content.objects.filter(front_project__state = 2)
    
    return render_to_response('home.html', {'contents': contents}, context_instance=RequestContext(request))

def player(request, contentid):
    
    content = Content.objects.get_by_natural_key(contentid)
    
    return render_to_response('player.html', {'content': content}, context_instance=RequestContext(request))