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
radiopanik
panikweb
Commits
5dc43c16
Commit
5dc43c16
authored
Sep 16, 2013
by
fred
Browse files
only display new emissions on homepage (arbitrary date for now)
parent
0a2f32c0
Changes
2
Show whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
5dc43c16
...
...
@@ -405,7 +405,8 @@ class Home(TemplateView):
context
=
super
(
Home
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"Home"
context
[
'focus'
]
=
NewsItem
.
objects
.
select_related
(
'category'
).
filter
(
focus
=
True
).
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-date'
)[:
9
]
context
[
'emissions'
]
=
list
(
Emission
.
objects
.
filter
(
archived
=
False
).
order_by
(
'title'
))
context
[
'emissions'
]
=
Emission
.
objects
.
filter
(
archived
=
False
,
creation_timestamp__gte
=
datetime
(
2013
,
9
,
13
)).
order_by
(
'title'
)
schedules
=
Schedule
.
objects
.
select_related
().
order_by
(
'datetime'
)
days
=
[]
for
day
in
range
(
7
):
...
...
panikweb_templates/templates/home.html
View file @
5dc43c16
...
...
@@ -38,7 +38,7 @@
{% endblock %}
{% block links %}
<div
class=
"wrapper"
>
<h2><a
href=
"{% url 'emissions' %}"
>
Émissions
</a></h2>
<h2><a
href=
"{% url 'emissions' %}"
>
Nouvelles émissions dans la grille
</a></h2>
<ul
class=
"custom list columns padded"
>
{% for emission in emissions %}
<li
class=
"item ellipsis"
>
...
...
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