##// END OF EJS Templates
Added checkinf form fields when creating a new thread.
Added checkinf form fields when creating a new thread.

File last commit:

r18:174f8766 default
r18:174f8766 default
Show More
posting_general.html
52 lines | 1.4 KiB | text/html | HtmlLexer
{% extends "base.html" %}
{% block content %}
{% if threads %}
{% for thread in threads %}
<span class="title">{{ thread.title }}</span><br />
<span class="text">{{ thread.text }}</span><br />
<a class="link" href="/boards/post/{{ thread.id }}/">View
thread</a>
<hr />
{% endfor %}
{% else %}
No threads found.
<hr />
{% endif %}
<div class="post-form">
<form action="/boards/" method="post">{% csrf_token %}
<div class="input_field_name">
<span class=input_field_error>{{ form.title.errors }}</span>
<label class=input_field_name for="title">Title</label>
{{ form.title }}
</div>
<div class="input_field_name">
<span class=input_field_error>{{ form.text.errors }}</span>
<label class=input_field_name for="text">Text</label>
{{ form.text }}
</div>
<div class="input_field_name">
<label class=input_field_name for="image">Avatar</label>
{{ form.image }}
</div>
<div class="input_field_name">
<span class=input_field_error>{{ form.tags.errors}}</span>
<label class=input_field_name for="tags">Name</label>
{{ form.tags }}
</div>
<input type="submit" value="Create" />
</form>
</div>
<HR />
{% endblock %}