]> projects.mako.cc - iron-blogger/blobdiff - render.py
Add Adam Fletcher
[iron-blogger] / render.py
index 478c44cd3af3b590121d46d404ee430ed1197194..dc4ad3d560cd36767802a7b4d3fd346d4d594531 100755 (executable)
--- a/render.py
+++ b/render.py
@@ -40,6 +40,7 @@ def render_template(path, week=None):
         u.username = un
         u.links = rec['links']
         u.start = rec['start']
         u.username = un
         u.links = rec['links']
         u.start = rec['start']
+        u.end   = rec.get('end')
         u.weeks = report.get(un, [])
 
         userlist.append(u)
         u.weeks = report.get(un, [])
 
         userlist.append(u)
@@ -51,6 +52,9 @@ def render_template(path, week=None):
 
     for u in userlist:
         user_start = parse(u.start, default=START)
 
     for u in userlist:
         user_start = parse(u.start, default=START)
+        if u.end and parse(u.end, default=START) <= week_start:
+            continue
+
         if user_start > week_start:
             skip.append(u)
         elif len(u.weeks) <= week or not u.weeks[week]:
         if user_start > week_start:
             skip.append(u)
         elif len(u.weeks) <= week or not u.weeks[week]:

Benjamin Mako Hill || Want to submit a patch?