Commit 5b980e4f by alexandre

Montre le début des articles non-publiés en ligne

parent 7f5c114d
......@@ -45,7 +45,7 @@
{% if object.published_online %}
{{ object.body|safe }}
{% else %}
{{ object.body|truncatewords_html_custom:200|safe }}
{{ object.body|truncatewords_html_custom:100|safe }}
{% endif %}
</div>
</div>
......
......@@ -77,8 +77,7 @@
<span class="article__rubric-title">{{ object.rubric.title|safe }}</span>
</p>
<!-- <h1 class="article__headline"><a href="{% url 'article-detail-site' object.slug %}">{{ object.title|typogrify|safe }}</a></h1> -->
<h1 class="article__headline">{{ object.title|typogrify|safe }}</h1>
<h1 class="article__headline"><a href="{% url 'article-detail-site' object.slug %}">{{ object.title|typogrify|safe }}</a></h1>
{% if object.subtitle %}
<h2 class="article__subhead">{{ object.subtitle|typogrify|safe }}</h2>
......
......@@ -147,17 +147,6 @@ class ArticleDetailView(DetailView):
"""
model = Article
def get_object(self):
object = super(ArticleDetailView, self).get_object()
# object is marked as published online and/or is published on the timeline:
if object.published_online or object.articlemembershipweb_set.count():
return object
# superusers get to read anything
if self.request.user.is_superuser:
return object
# if none of the above, raise a 404
raise Http404
class PileDeMedorsView(ListView):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment