##// 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
posting_general.html
62 lines | 2.2 KiB | text/html | HtmlLexer
/ templates / posting_general.html
Ilyas
Added admin loing possibility. Now it is abailable under {BASE_URL}/boards/login...
r9 {% extends "base.html" %}
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 {% load i18n %}
Ilyas
Added admin loing possibility. Now it is abailable under {BASE_URL}/boards/login...
r9 {% block content %}
Ilyas
Added creating new thread form...
r14 {% if threads %}
{% for thread in threads %}
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 thread.image %}
<div class="block">
<a href="{{ thread.image.url }}"><img
src="{{ thread.image.url_200x150 }}" />
</a>
</div>
{% endif %}
<div class="block">
<span class="title">{{ thread.title }}</span>
neko259
Added post publication date to the templates.
r26 <span class="post_id">(#{{ thread.id }})</span>
[{{ thread.pub_time }}]
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 <a class="link" href="/thread/{{ thread.id }}/">
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 [{% trans "View" %}]</a><br />
neko259
Truncating thread text in threads list. Fixed tag threads order.
r27 {{ thread.text|truncatechars:300 }}<br />
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 {% if thread.tags %}
<span class="tags">{% trans 'Tags' %}:
{% for tag in thread.tags.all %}
<a class="tag" href="/tag/{{ tag.name }}">
{{ tag.name }}</a>
{% endfor %}
</span>
{% endif %}
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 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 {% endfor %}
Ilyas
Added creating new thread form...
r14 {% else %}
neko259
Added localization (not fully working). Added tags posting. Changed the design a bit.
r24 No threads found.
neko259
Added a text area to the posting form. Added a basic CSS style. Changed threads list a bit.
r16 <hr />
Ilyas
Added creating new thread form...
r14 {% endif %}
neko259
Added a text area to the posting form. Added a basic CSS style. Changed threads list a bit.
r16 <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 "Create new 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>
<div class="form-row">
<div class="form-input">{% trans 'Tags' %}</div>
<div class="form-input">{{ form.tags }}</div>
</div>
<input type="submit" value="{% trans 'Post' %}" />
</form>
neko259
Added a text area to the posting form. Added a basic CSS style. Changed threads list a bit.
r16 </div>
Ilyas
Added creating new thread form...
r14
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 %}