Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
rpteam
rp
Commits
db694f8d
Commit
db694f8d
authored
Apr 25, 2017
by
luxcem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix urls reverse
parent
88a40a90
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
apps/rp/templates/rp/article_list.html
apps/rp/templates/rp/article_list.html
+3
-3
apps/rp/tests/test_udlistview.py
apps/rp/tests/test_udlistview.py
+19
-0
No files found.
apps/rp/templates/rp/article_list.html
View file @
db694f8d
...
@@ -6,17 +6,17 @@
...
@@ -6,17 +6,17 @@
<div
class=
"col-md-12 white-bg"
>
<div
class=
"col-md-12 white-bg"
>
<ul
class=
"nav nav-integrated"
>
<ul
class=
"nav nav-integrated"
>
<li
class=
"nav-item{% if filter_view == 'flux' %} active{% endif %}"
>
<li
class=
"nav-item{% if filter_view == 'flux' %} active{% endif %}"
>
<a
class=
"nav-link"
href=
"{% url 'article-list' filter_view='flux'%}"
>
<a
class=
"nav-link"
href=
"{% url '
rp:
article-list' filter_view='flux'%}"
>
Flux
<img
style=
"width: 2rem; margin-left: 0.5rem;"
src=
"/static/img/cochon-01.png"
alt=
""
>
Flux
<img
style=
"width: 2rem; margin-left: 0.5rem;"
src=
"/static/img/cochon-01.png"
alt=
""
>
</a>
</a>
</li>
</li>
<li
class=
"nav-item {% if filter_view == 'draft' %} active{% endif %}"
>
<li
class=
"nav-item {% if filter_view == 'draft' %} active{% endif %}"
>
<a
class=
"nav-link"
href=
"{% url 'article-list' filter_view='draft'%}"
>
<a
class=
"nav-link"
href=
"{% url '
rp:
article-list' filter_view='draft'%}"
>
En attente
<span
class=
"badge badge-default"
>
{{nb_draft}}
</span>
En attente
<span
class=
"badge badge-default"
>
{{nb_draft}}
</span>
</a>
</a>
</li>
</li>
<li
class=
"nav-item {% if filter_view == 'published' %} active{% endif %}"
>
<li
class=
"nav-item {% if filter_view == 'published' %} active{% endif %}"
>
<a
class=
"nav-link"
href=
"{% url 'article-list' filter_view='published'%}"
>
Publiés
</a>
<a
class=
"nav-link"
href=
"{% url '
rp:
article-list' filter_view='published'%}"
>
Publiés
</a>
</li>
</li>
</ul>
</ul>
...
...
apps/rp/tests/test_udlistview.py
0 → 100644
View file @
db694f8d
from
django.urls
import
reverse
from
django.test
import
TestCase
from
userprofile.factories
import
ProfileFactory
from
rp.factories
import
ArticleFactory
# from rp.models import Article
class
ArticleListTestCase
(
TestCase
):
def
setUp
(
self
):
self
.
article
=
ArticleFactory
()
self
.
profile
=
ProfileFactory
()
self
.
user
=
self
.
profile
.
user
self
.
client
.
force_login
(
self
.
user
)
def
test_votes
(
self
):
url_list
=
reverse
(
"rp:article-list"
)
response
=
self
.
client
.
get
(
url_list
)
assert
response
.
status_code
==
200
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