3e268301c7a59fb2b256b25f7dca0a1aa0b62113
[auf_rh_dae.git] / project / views.py
1 # -*- encoding: utf-8 -*-
2 from django.contrib.auth.decorators import login_required
3 from django.shortcuts import render_to_response
4 from django.template import RequestContext
5
6 import rh.models as rh
7
8 @login_required
9 def accueil(request):
10 """Accueil = Tableau de bord de l'utilisateur"""
11 rc = RequestContext(request)
12 c = {}
13
14 # TODO : debug
15 employes = rh.Employe.objects.filter(actif=True).exclude(supprime=True).order_by('?')
16
17 c['employes'] = employes[0:10]
18 return render_to_response('accueil.html', c, rc)
19
20 def erreur404(request) :
21 c = {
22 'user':request.user,
23 }
24 return render_to_response('404.html', c,
25 context_instance = RequestContext(request))
26
27 def erreur500(request) :
28 c = {
29 'user':request.user,
30 }
31 return render_to_response('500.html', c,
32 context_instance = RequestContext(request))
33
34 def erreur550(request) :
35 c = {
36 'user':request.user,
37 }
38 return render_to_response('550.html', c,
39 context_instance = RequestContext(request))