Commit ea5fe74d authored by fred's avatar fred
Browse files

grid: use schedule constant for day start hour

parent 903a2452
......@@ -63,8 +63,8 @@ class Grid(TemplateView):
grid = []
times = ['%02d:%02d' % (x/2, x%2*30) for x in range(nb_lines)]
# grid starts at 5am
times = times[2*5:] + times[:2*5]
# start grid after the night programs
times = times[2*Schedule.DAY_HOUR_START:] + times[:2*Schedule.DAY_HOUR_START]
nonstops = [[0, 2, 'Biodiversite'],
[2, 5, 'Reveries'],
......@@ -97,8 +97,8 @@ class Grid(TemplateView):
grid[(row_start+step)%nb_lines][day_no] = TimeCell()
grid[(row_start+step)%nb_lines][day_no].add_schedule(schedule)
# start grid at 5am
grid = grid[2*5:] + grid[:2*5]
# start grid after the night programs
grid = grid[2*Schedule.DAY_HOUR_START:] + grid[:2*Schedule.DAY_HOUR_START]
# merge adjacent cells
for i in range(nb_lines):
......
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