Commit 617c320e authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

add Not found

parent d47fb655
......@@ -45,6 +45,7 @@
{% paginate news %}
<form class="form">
<table class="table table-hover">
<thead class="thead-inverse">
......@@ -70,6 +71,9 @@
</tr>
</thead>
<tbody>
{% if not news %}
<tr><td><h3>Not found</h3></td></tr>
{% endif %}
{% for i in news %}
<tr id="{{ i.id }}">
<td>
......
......@@ -31,9 +31,9 @@ class ListNewsView(ListView):
if search:
news = news.filter(Q(title__icontains=search) | Q(description__icontains=search))
if from_date:
news = news.filter(record_date__gte=from_date)
news = news.filter(publish_date__gte=from_date)
if to_date:
news = news.filter(record_date__lte=to_date)
news = news.filter(publish_date__lte=to_date)
if media:
news = self._filter_by_media(news, media)
media = WpEsiMedia.objects.all()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment