Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
E
esi-table-data
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esi-data-scrapping
esi-table-data
Commits
617c320e
Commit
617c320e
authored
Jun 06, 2017
by
Vasyl Bodnaruk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Not found
parent
d47fb655
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
list_news.html
esi/templates/list_news.html
+4
-0
views.py
esi/webapp/views.py
+2
-2
No files found.
esi/templates/list_news.html
View file @
617c320e
...
...
@@ -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>
...
...
esi/webapp/views.py
View file @
617c320e
...
...
@@ -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
()
...
...
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