Skip to content
GitLab
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
3b192ad0
Commit
3b192ad0
authored
Aug 23, 2013
by
fred
Browse files
performance: do not query for emissions in news view
parent
cfb790e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
3b192ad0
...
...
@@ -185,7 +185,6 @@ class News(TemplateView):
context
[
'newsImaged'
]
=
NewsItem
.
objects
.
all
().
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[:
3
]
context
[
'news'
]
=
NewsItem
.
objects
.
all
().
order_by
(
'-datetime'
)[:
60
]
context
[
'categories'
]
=
NewsCategory
.
objects
.
all
()
context
[
'emissions'
]
=
Emission
.
objects
.
filter
(
archived
=
False
).
order_by
(
'?'
)
context
[
'player'
]
=
audioPlayer
()
return
context
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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