Discipline et Thematiques classes utilisées a partir de savoir et datamaster
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / sites / views.py
CommitLineData
01a9197e 1# -*- encoding: utf-8 -*-
2from django.shortcuts import render_to_response
3from django.template import Context, RequestContext
4
5from models import Site
6
7def index(request):
8 sites = Site.objects.all()
9 variables = { 'sites': sites,
10 }
11 return render_to_response ("sites/index.html", \
12 Context (variables),
13 context_instance = RequestContext(request))
6e001443 14
15def retrieve(request, id):
16 """Fiche du site"""
17 site = Site.objects.get(id=id)
18 variables = { 'site': site,
19 }
20 return render_to_response ("sites/retrieve.html", \
21 Context (variables),
22 context_instance = RequestContext(request))