##// END OF EJS Templates
Implemented form validation. When the form fails validation, showing the index page.
Implemented form validation. When the form fails validation, showing the index page.

File last commit:

r28:b39294a8 default
r29:575870f6 default
Show More
thread.html
56 lines | 1.9 KiB | text/html | HtmlLexer
neko259
Added a page to view the thread.
r20 {% extends "base.html" %}
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 {% load i18n %}
neko259
Added a page to view the thread.
r20 {% block content %}
{% if posts %}
{% for post in posts %}
neko259
Added maximum threads count parameter to the settings. Delete the old posts to preserve the max count. Small design tweaks.
r28 <div class="post">
neko259
Added images upload. Changed the design a bit. Reformatted some code by PEP 8. Changed the urls: not the main site is located at /, not /boards/.
r22 {% if post.image %}
<div class="block">
<a href="{{ post.image.url }}"><img
src="{{ post.image.url_200x150 }}" />
</a>
</div>
{% endif %}
<div class="block">
<span class="title">{{ post.title }}</span>
neko259
Added post publication date to the templates.
r26 <span class="post_id">(#{{ post.id }})</span>
[{{ post.pub_time }}]<br />
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 {{ post.text }}<br />
neko259
Added post publication date to the templates.
r26 {% ifnotequal post.tags.all|length 0 %}
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 <span class="tags">{% trans 'Tags' %}:
{% for tag in post.tags.all %}
<a class="tag" href="/tag/{{ tag.name }}">
{{ tag.name }}</a>
{% endfor %}
</span>
neko259
Added post publication date to the templates.
r26 {% endifnotequal %}
neko259
Added images upload. Changed the design a bit. Reformatted some code by PEP 8. Changed the urls: not the main site is located at /, not /boards/.
r22 </div>
neko259
Added maximum threads count parameter to the settings. Delete the old posts to preserve the max count. Small design tweaks.
r28 </div>
neko259
Added a page to view the thread.
r20 {% endfor %}
{% else %}
No threads found.
<hr />
{% endif %}
<div class="post-form">
neko259
Added maximum threads count parameter to the settings. Delete the old posts to preserve the max count. Small design tweaks.
r28 <span class="form-title">{% trans "Reply to the thread" %}</span>
<form enctype="multipart/form-data" method="post">{% csrf_token %}
<div class="form-row">
<div class="form-input">{% trans 'Title' %}</div>
<div class="form-input">{{ form.title }}</div>
</div>
<div class="form-row">
<div class="form-input">{% trans 'Text' %}</div>
<div class="form-input">{{ form.text }}</div>
</div>
<div class="form-row">
<div class="form-input">{% trans 'Image' %}</div>
<div class="form-input">{{ form.image }}</div>
</div>
<input type="submit" value="{% trans 'Post' %}" />
</form>
neko259
Added a page to view the thread.
r20 </div>
neko259
Added images upload. Changed the design a bit. Reformatted some code by PEP 8. Changed the urls: not the main site is located at /, not /boards/.
r22 {% endblock %}