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 %}
|
{% block content %}
|
||||||
<h1>{{ blog_title }}{% if title %} · {{ title }}{% endif %}</h1>
|
<h1>{{ blog_title }}{% if title %} · {{ title }}{% endif %}</h1>
|
||||||
<p class="metadata">{{ blog_description }}</p>
|
<p class="metadata">{{ blog_description }}</p>
|
||||||
|
<ul>
|
||||||
{% for article in articles %}
|
{% for article in articles %}
|
||||||
<article class="article-list">
|
<li>
|
||||||
<h2><a href="{% url 'article-detail' slug=article.slug %}">{{ article.title }}</a></h2>
|
{% if article.published_at %}
|
||||||
{% include "articles/metadata_snippet.html" %}
|
<time datetime="{{ article.published_at|date:CUSTOM_ISO }}">{{ article.published_at|date }}</time>
|
||||||
{{ article.get_abstract|safe }}
|
{% else %}
|
||||||
<p class="read-more"><a href="{% url 'article-detail' slug=article.slug %}">Read more...</a></p>
|
<time datetime="{{ article.updated_at|date:CUSTOM_ISO }}">{{ article.updated_at|date }}</time>
|
||||||
</article>
|
{% endif %}
|
||||||
|
: <a href="{% url 'article-detail' slug=article.slug %}">{{ article.title }}</a>
|
||||||
|
</li>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<p>No article here. Come back later 🙂</p>
|
<li>No article here. Come back later 🙂</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
<nav class="pagination">
|
<nav class="pagination">
|
||||||
<div class="older">
|
<div class="older">
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
|
|
|
@ -9,8 +9,6 @@ from articles.models import Article, Page
|
||||||
|
|
||||||
|
|
||||||
class BaseArticleListView(generic.ListView):
|
class BaseArticleListView(generic.ListView):
|
||||||
paginate_by = 15
|
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context["blog_title"] = settings.BLOG["title"]
|
context["blog_title"] = settings.BLOG["title"]
|
||||||
|
|
Reference in a new issue