aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2015-02-28 22:33:54 +0100
committerpiernov <piernov@piernov.org>2015-02-28 22:33:54 +0100
commit38ac44387bd58fc4e3a1956934f3ddb7f8dbd11f (patch)
tree6291edaf6646489c097cd8ca1fd441a75bda9f2c
parent5af8f20e98554d121b3a81e3260dbfd64db74a2b (diff)
downloadjm2l-38ac44387bd58fc4e3a1956934f3ddb7f8dbd11f.tar.gz
jm2l-38ac44387bd58fc4e3a1956934f3ddb7f8dbd11f.tar.bz2
jm2l-38ac44387bd58fc4e3a1956934f3ddb7f8dbd11f.tar.xz
jm2l-38ac44387bd58fc4e3a1956934f3ddb7f8dbd11f.zip
Replace 2 filter() by list comprehensions
-rw-r--r--jm2l/templates/Interventions/Interventions.mako4
1 files changed, 2 insertions, 2 deletions
diff --git a/jm2l/templates/Interventions/Interventions.mako b/jm2l/templates/Interventions/Interventions.mako
index 8877efc..f917e63 100644
--- a/jm2l/templates/Interventions/Interventions.mako
+++ b/jm2l/templates/Interventions/Interventions.mako
@@ -65,7 +65,7 @@ elif Type=='T':
<fieldset>
<legend>Vos ${CurTitles} programmés pour 2015</legend>
<%
-Selection = filter(lambda x:(x.event_type==CurEventType and x.for_year==2015), uprofil.events)
+Selection = [ x for x in uprofil.events if (x.event_type==CurEventType and x.for_year==2015) ]
HeadHistTitle = u"L'historique de vos %s ( %d ) " % ( CurTitles, len(Selection) )
NothingTitle = u"Vous n'avez pas sollicité d'intervention %s." % CurEvent
%>
@@ -224,7 +224,7 @@ NothingTitle = u"Vous n'avez pas sollicité d'intervention %s." % CurEvent
<fieldset>
<legend>Historique</legend>
<%
-Selection = filter(lambda x:(x.event_type==CurEventType and x.for_year!=2015), uprofil.events)
+Selection = [ x for x in uprofil.events if (x.event_type==CurEventType and x.for_year!=2015) ]
HeadHistTitle = u"L'historique de vos %s ( %d ) " % ( CurTitles, len(Selection) )
NothingTitle = u"Désolé, Il n'y a rien dans l'historique vous concernant."
%>