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
925726f6
Commit
925726f6
authored
Oct 17, 2013
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
home: get 'new emissions' list ordered by creation time
parent
25ba5325
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
panikweb/views.py
panikweb/views.py
+1
-2
No files found.
panikweb/views.py
View file @
925726f6
...
...
@@ -408,8 +408,7 @@ class Home(TemplateView):
context
[
'sectionName'
]
=
"Home"
context
[
'focus'
]
=
Focus
.
objects
.
filter
(
current
=
True
).
select_related
(
'emission'
,
'newsitem'
,
'soundfile'
,
'episode'
,
'newsitem__category'
).
order_by
(
'?'
)[:
12
]
context
[
'emissions'
]
=
Emission
.
objects
.
filter
(
archived
=
False
,
creation_timestamp__gte
=
datetime
(
2013
,
9
,
13
)).
order_by
(
'title'
)
context
[
'emissions'
]
=
Emission
.
objects
.
filter
(
archived
=
False
).
order_by
(
'-creation_timestamp'
)[:
3
]
context
[
'newsitems'
]
=
NewsItem
.
objects
.
order_by
(
'-date'
)[:
3
]
context
[
'soundfiles'
]
=
SoundFile
.
objects
.
prefetch_related
(
'episode__emission__categories'
).
filter
(
...
...
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