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
f2d0e5d8
Commit
f2d0e5d8
authored
Sep 07, 2013
by
Simon Daron
Browse files
Only 5 news on HOME
parent
d7b847d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
f2d0e5d8
...
...
@@ -375,7 +375,7 @@ class Home(TemplateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Home
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"Home"
context
[
'focus'
]
=
list
(
NewsItem
.
objects
.
all
().
filter
(
focus
=
True
).
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[
0
:
9
])
context
[
'focus'
]
=
list
(
NewsItem
.
objects
.
all
().
filter
(
focus
=
True
).
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[
0
:
5
])
context
[
'emissions'
]
=
list
(
Emission
.
objects
.
filter
(
archived
=
False
).
order_by
(
'title'
))
schedules
=
Schedule
.
objects
.
select_related
().
order_by
(
'datetime'
)
days
=
[]
...
...
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