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
La Quadrature du Net
rpteam
Revue de Press
Commits
db694f8d
Commit
db694f8d
authored
Apr 25, 2017
by
luxcem
Browse files
fix urls reverse
parent
88a40a90
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/rp/templates/rp/article_list.html
View file @
db694f8d
...
...
@@ -6,17 +6,17 @@
<div
class=
"col-md-12 white-bg"
>
<ul
class=
"nav nav-integrated"
>
<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=
""
>
</a>
</li>
<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>
</a>
</li>
<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>
</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
Supports
Markdown
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