Don't show abstract on articles list

This commit is contained in:
Gabriel Augendre 2020-11-24 21:54:42 +01:00
parent 1f91b76837
commit 7f64b9d05f
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4
2 changed files with 11 additions and 9 deletions

View file

@ -6,16 +6,20 @@
{% block content %}
<h1>{{ blog_title }}{% if title %} &middot; {{ title }}{% endif %}</h1>
<p class="metadata">{{ blog_description }}</p>
<ul>
{% for article in articles %}
<article class="article-list">
<h2><a href="{% url 'article-detail' slug=article.slug %}">{{ article.title }}</a></h2>
{% include "articles/metadata_snippet.html" %}
{{ article.get_abstract|safe }}
<p class="read-more"><a href="{% url 'article-detail' slug=article.slug %}">Read more...</a></p>
</article>
<li>
{% if article.published_at %}
<time datetime="{{ article.published_at|date:CUSTOM_ISO }}">{{ article.published_at|date }}</time>
{% else %}
<time datetime="{{ article.updated_at|date:CUSTOM_ISO }}">{{ article.updated_at|date }}</time>
{% endif %}
: <a href="{% url 'article-detail' slug=article.slug %}">{{ article.title }}</a>
</li>
{% empty %}
<p>No article here. Come back later 🙂</p>
<li>No article here. Come back later 🙂</li>
{% endfor %}
</ul>
<nav class="pagination">
<div class="older">
{% if page_obj.has_next %}

View file

@ -9,8 +9,6 @@ from articles.models import Article, Page
class BaseArticleListView(generic.ListView):
paginate_by = 15
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["blog_title"] = settings.BLOG["title"]