X-Git-Url: http://git.auf.org/?p=auf_savoirs_en_partage_django.git;a=blobdiff_plain;f=auf_savoirs_en_partage%2Fsavoirs%2Fviews.py;h=883e56dcc9419b13ff427e0c06b64d3d84431d6a;hp=c67d069ff80fff083e806875ef14e724d07a1a9d;hb=91ff43e90431678a0043a946b47b21c9d9445126;hpb=7cf64fde4bf84c67aaffca457eab73241b5b45de diff --git a/auf_savoirs_en_partage/savoirs/views.py b/auf_savoirs_en_partage/savoirs/views.py index c67d069..883e56d 100644 --- a/auf_savoirs_en_partage/savoirs/views.py +++ b/auf_savoirs_en_partage/savoirs/views.py @@ -12,6 +12,7 @@ from lib.recherche import cherche, google_search from lib import sep from lib.calendrier import evenements, evenement_info, evenement_publie, combine from savoirs.globals import configuration +import backend_config from forms import * from models import * @@ -81,15 +82,17 @@ def conseils (request): def a_propos (request): return render_to_response ("savoirs/a-propos.html", \ - Context ({'count': len(sep.conf.RESOURCES)}), \ + Context ({'count': len(backend_config.RESOURCES)}), \ context_instance = RequestContext(request)) def informations (request): s = sep.SEP() t = s.logs() - resources = copy.deepcopy (sep.conf.RESOURCES) + resources = copy.deepcopy (backend_config.RESOURCES) for k in t.keys (): - resources[k]['logs'] = { 'date': t[k][0], 'count': t[k][1] } + try: + resources[k]['logs'] = { 'date': t[k][0], 'count': t[k][1] } + except: pass return render_to_response ("savoirs/informations.html", \ Context ({'r': resources}), \ context_instance = RequestContext(request))