add language field to text model, output en and zh texts separately, refs #30

This commit is contained in:
Sanjay B 2021-10-28 15:42:34 +05:30
commit 21dab42524
5 changed files with 44 additions and 6 deletions

View file

@ -3,10 +3,17 @@
{% block main %}
<div class="texts">
{% for text in texts %}
<div class="text">
{% for text in en_texts %}
<div class="text en">
<h1><a href="{{ text.get_absolute_url }}">{{ text.title | safe }}</a></h1>
<h2>{{ text.byline|striptags }}</h2>
</div>
{% endfor %}
{% for text in zh_texts %}
<div class="text zh">
<h1><a href="{{ text.get_absolute_url }}">{{ text.title | safe }}</a></h1>
<h2>{{ text.byline|striptags }}</h2>
</div>
{% endfor %}
</div>
{% endblock %}