Mes premières dents (les incisives) sur Django...
[progfou.git] / auf_zap / formations / views.py
1 from django.shortcuts import render_to_response, get_object_or_404
2 from auf_zap.formations.models import Formation
3
4 def index(request):
5 #dernieres_formations = Formation.objects.all().order_by('-date_enregistrement')[:5]
6 return render_to_response('formations/index.html', {})
7
8 def 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