Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikweb
Commits
d479bdec
Commit
d479bdec
authored
Aug 15, 2013
by
fred
Browse files
grid: fix placement of emissions crossing the midnight line
parent
b02b226f
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
d479bdec
...
...
@@ -85,11 +85,9 @@ class Grid(TemplateView):
day_no
=
schedule
.
get_weekday
()
for
step
in
range
(
int
(
math
.
ceil
(
schedule
.
emission
.
duration
/
30
))):
if
grid
[
row_start
+
step
][
day_no
]
is
None
:
print
'creating a time cell at'
,
row_start
+
step
,
day_no
grid
[
row_start
+
step
][
day_no
]
=
TimeCell
()
grid
[
row_start
+
step
][
day_no
].
add_emission
(
schedule
.
emission
)
if
grid
[(
row_start
+
step
)
%
nb_lines
][
day_no
]
is
None
:
grid
[(
row_start
+
step
)
%
nb_lines
][
day_no
]
=
TimeCell
()
grid
[(
row_start
+
step
)
%
nb_lines
][
day_no
].
add_emission
(
schedule
.
emission
)
# start grid at 5am
grid
=
grid
[
2
*
5
:]
+
grid
[:
2
*
5
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment