Skip to content
GitLab
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
f4c67740
Commit
f4c67740
authored
Sep 25, 2019
by
Okhin
Browse files
Was missing an article_ prefix in a templates which raised an error
parent
6dadc540
Pipeline
#2688
passed with stages
in 3 minutes and 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/rp/models.py
View file @
f4c67740
...
...
@@ -49,7 +49,7 @@ class Article(models.Model):
#: Language of the webpage
lang
=
models
.
CharField
(
_
(
"Language"
),
choices
=
LANG_CHOICES
,
default
=
"
NA
"
,
max_length
=
5
0
)
_
(
"Language"
),
choices
=
LANG_CHOICES
,
default
=
"
FR
"
,
max_length
=
5
)
#: Plain-text Opengraph metadata
metadata
=
models
.
TextField
(
...
...
@@ -242,7 +242,7 @@ class Article(models.Model):
if
self
.
original_status
>=
400
:
return
article
.
download
(
request_timeout
=
1
)
article
.
download
()
try
:
article
.
throw_if_not_downloaded_verbose
()
except
ArticleException
:
...
...
apps/rp/templates/rp/article_detail.html
View file @
f4c67740
...
...
@@ -75,8 +75,8 @@
<p>
{{object.extracts |markdown}}
</p>
{% if perms.rp.can_vote %}
<span>
<a
href=
"{% url 'api:upvote' object.id %}"
class=
"btn btn-outline-default"
>
+1
</a>
<a
href=
"{% url 'api:downvote' object.id %}"
class=
"btn btn-outline-default"
>
-1
</a>
<a
href=
"{% url 'api:
article-
upvote' object.id %}"
class=
"btn btn-outline-default"
>
+1
</a>
<a
href=
"{% url 'api:
article-
downvote' object.id %}"
class=
"btn btn-outline-default"
>
-1
</a>
</span>
{% endif %}
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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