Mes premières dents (les incisives) sur Django...
[progfou.git] / auf_zap / formations / views.py
... / ...
CommitLineData
1from django.shortcuts import render_to_response, get_object_or_404
2from auf_zap.formations.models import Formation
3
4def index(request):
5 #dernieres_formations = Formation.objects.all().order_by('-date_enregistrement')[:5]
6 return render_to_response('formations/index.html', {})
7
8def detail(request, formation_id):
9 f = get_object_or_404(Formation, pk=formation_id)
10 return render_to_response('formations/detail.html', {'formation': f})
11