web/tralalere/views.py
author ymh <ymh.work@gmail.com>
Wed, 06 Jun 2012 23:00:42 +0200
changeset 16 e37a29d23c86
child 19 a019732d9700
permissions -rw-r--r--
First version of tralalere platform
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
from django.shortcuts import render_to_response
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from django.template import RequestContext
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
from ldt.ldt_utils.models import Content
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
def home(request):
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
    
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    contents = Content.objects.filter(front_project__state = 2)
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
    
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    return render_to_response('home.html', {'contents': contents}, context_instance=RequestContext(request))