]> git.0d.be Git - panikweb.git/commitdiff
reduce grid to noon -> 2am
authorFrédéric Péters <fpeters@0d.be>
Sat, 21 Jul 2018 18:09:32 +0000 (20:09 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 21 Jul 2018 18:09:32 +0000 (20:09 +0200)
panikweb/views.py

index 611b427231e1e253779cd763b641779a4f22ed8d..e5dae033ef30ec46b59d053d0a7649611ec8d084 100644 (file)
@@ -303,6 +303,8 @@ class Grid(TemplateView):
         nb_lines = 2 * 24 # the cells are half hours
         grid = []
 
+        Schedule.DAY_HOUR_START = 12
+
         times = ['%02d:%02d' % (x/2, x%2*30) for x in range(nb_lines)]
         # start grid after the night programs
         times = times[2*Schedule.DAY_HOUR_START:] + times[:2*Schedule.DAY_HOUR_START]
@@ -509,9 +511,9 @@ class Grid(TemplateView):
                 except IndexError:
                     pass
 
-        # cut night at 3am
-        grid = grid[:42]
-        times = times[:42]
+        # cut night
+        grid = grid[:28]
+        times = times[:28]
 
         context['grid'] = grid
         context['times'] = times