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
dce869c7
Commit
dce869c7
authored
Apr 23, 2017
by
luxcem
Browse files
fix urls
parent
75fb3fe6
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/rp/urls.py
View file @
dce869c7
from
django.conf.urls
import
url
from
rp.views.votes
import
upvote
,
downvote
from
rp.views.articles
import
ArticleListFlux
urlpatterns
=
[
...
...
@@ -13,14 +12,4 @@ urlpatterns = [
ArticleListFlux
.
as_view
(),
name
=
"article-list"
),
url
(
r
"^votes/upvote/(?P<content_type>\d+)/(?P<object_id>\d+)$"
,
upvote
,
name
=
"und-upvote"
),
url
(
r
"^votes/downvote/(?P<content_type>\d+)/(?P<object_id>\d+)$"
,
downvote
,
name
=
"und-downvote"
),
]
apps/rp/views/votes.py
View file @
dce869c7
...
...
@@ -4,7 +4,7 @@ from django.contrib.contenttypes.models import ContentType
class
UDList
(
ListView
):
"""
Ads id upvoted by user
Ad
d
s id upvoted by user
"""
def
get_context_data
(
self
,
**
kwargs
):
content_type
=
ContentType
.
objects
.
get_for_model
(
self
.
model
)
...
...
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