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
22d5425a
Commit
22d5425a
authored
Aug 24, 2013
by
fred
Browse files
performance: get emission objects along the schedules
parent
d683ab2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
22d5425a
...
...
@@ -17,7 +17,7 @@ class ProgramView(TemplateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
ProgramView
,
self
).
get_context_data
(
**
kwargs
)
schedules
=
Schedule
.
objects
.
all
().
order_by
(
'datetime'
)
schedules
=
Schedule
.
objects
.
select_related
().
order_by
(
'datetime'
)
days
=
[]
for
day
in
range
(
7
):
days
.
append
({
'schedules'
:
[
x
for
x
in
schedules
if
x
.
is_on_weekday
(
day
+
1
)],
...
...
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