Don't show abstract on articles list
This commit is contained in:
parent
1f91b76837
commit
7f64b9d05f
2 changed files with 11 additions and 9 deletions
|
@ -6,16 +6,20 @@
|
|||
{% block content %}
|
||||
<h1>{{ blog_title }}{% if title %} · {{ 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 %}
|
||||
|
|
|
@ -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"]
|
||||
|
|
Reference in a new issue