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
Simon Daron
panikweb
Commits
b291c6c0
Commit
b291c6c0
authored
Jan 02, 2014
by
fred
Browse files
episodes: order diffusion dates
parent
fd7fe5f8
Changes
1
Show whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
b291c6c0
...
...
@@ -109,7 +109,8 @@ class EpisodeDetailView(DetailView, EmissionMixin):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
EpisodeDetailView
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"Emissions"
context
[
'diffusions'
]
=
Diffusion
.
objects
.
select_related
().
filter
(
episode
=
self
.
object
.
id
)
context
[
'diffusions'
]
=
Diffusion
.
objects
.
select_related
().
filter
(
episode
=
self
.
object
.
id
).
order_by
(
'datetime'
)
context
[
'emission'
]
=
Emission
.
objects
.
get
(
slug
=
self
.
kwargs
.
get
(
'emission_slug'
))
context
.
update
(
self
.
get_emission_context
(
context
[
'emission'
]))
return
context
...
...
Write
Preview
Supports
Markdown
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