[accueil.py] il faut trier les applications avant de les regrouper

parent 707ace11
......@@ -30,5 +30,7 @@ from django.http import HttpResponse
def view(request):
'''Affiche toutes les applications disponibles en fonction des
droits de la personne connectée.'''
dico = {"apps" : list(settings.INTRANET_APPS), "session": request.session }
return django.shortcuts.render_to_response("accueil.html", dico)
session = request.session
apps = list(settings.INTRANET_APPS)
apps.sort(lambda x,y: cmp(x['category'], y['category']))
return django.shortcuts.render_to_response("accueil.html", locals())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment