Skip to content

Commit

Permalink
Merge branch 'WUJISHANXIA-develop' into develop with some changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-code committed Nov 1, 2017
2 parents 1e106c3 + 0c58345 commit 886bab0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bootcamp/articles/templates/articles/articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>{% trans 'Articles' %}</h1>
<div class="col-md-10">
<section class="articles">
{% for article in articles %}
{% include 'articles/partial_article.html' with article=article %}
{% include 'articles/partial_article.html' with article=article is_articles=forloop %}
{% empty %}
<h4 class="no-data">{% trans 'There is no published article yet' %}. <a href="{% url 'write' %}">{% trans 'Be the first one to publish' %}!</a></h4>
{% endfor %}
Expand Down
6 changes: 5 additions & 1 deletion bootcamp/articles/templates/articles/partial_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ <h2><a href="{% url 'article' article.slug %}">{{ article.title }}</a></h2>
</span>
</div>
<div class="content">
{{ article.get_content_as_markdown|safe }}
{% if is_articles %}
{{ article.get_summary_as_markdown|safe }}
{% else %}
{{ article.get_content_as_markdown|safe }}
{% endif %}
</div>
{% if article.tags.names %}
<div class="tags">
Expand Down
2 changes: 0 additions & 2 deletions bootcamp/messenger/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import json

from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseBadRequest
Expand Down

0 comments on commit 886bab0

Please sign in to comment.