Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
radiopanik
panikweb
Commits
69d3feb7
Commit
69d3feb7
authored
Sep 08, 2013
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
performance: prefetch categories in listen page (190 -> 12 SQL queries)
parent
8c292fda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
panikweb/views.py
panikweb/views.py
+1
-1
No files found.
panikweb/views.py
View file @
69d3feb7
...
...
@@ -482,7 +482,7 @@ class Listen(TemplateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Listen
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"Listen"
context
[
'episodes'
]
=
Episode
.
objects
.
filter
(
context
[
'episodes'
]
=
Episode
.
objects
.
prefetch_related
(
'emission__categories'
).
filter
(
soundfile__podcastable
=
True
,
soundfile__fragment
=
False
)
\
.
select_related
().
extra
(
select
=
{
'first_diffusion'
:
'emissions_diffusion.datetime'
,
},
...
...
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