1
1
{% extends "base.html" %}
3
{% block pagetitle %}{{ form.title }}{% endblock %}
5
{% block pageheader %}{{ form.title }}{% endblock %}
5
{% block pagetitle %}Post a one-liner{% endblock %}
7
7
{% block keywords %}{% endblock %}
11
11
{% block content %}
14
<div class="alert alert-info related">
15
<p>The new one-liner will be linked to the following question as a possible answer:</p>
16
{% with 1 as nobuttons %}
17
{% include 'main/elements/question.html' %}
23
<div class="alert alert-info related">
24
<p>The new one-liner will be linked to the following one-liner as an alternative:</p>
25
{% with 1 as nobuttons %}
26
{% include 'main/elements/oneliner.html' %}
31
{% include 'main/elements/please_login.html' %}
34
<li>Before you post, please do a quick search to confirm the one-liner does not exist yet.</li>
35
<li>Please post only non-trivial and really useful, interesting or awesome one-liners.</li>
36
<li>The <strong>Explanation</strong> is very important. The purpose of this site is to teach, not to show off.</li>
39
{% include 'main/elements/oneliner_edit_form.html' %}
44
$('#id_summary').focus();
13
<form action="" method="post">{% csrf_token %}
14
<div class="non-field-errors">{{ form.non_field_errors }}</div>
15
<div class="oneliner">
17
<dt><label for="id_line">The one-liner</label></dt>
19
<div class="error">{{ form.line.errors }}</div>
20
<pre>{{ form.line }}</pre>
23
<dt>Brief summary</dt>
25
<div class="error">{{ form.summary.errors }}</div>
31
<dt>Detailed explanation</dt>
33
<div class="error">{{ form.explanation.errors }}</div>
34
<div class="explanation">
35
{{ form.explanation }}
39
<dt>Caveats (if any)</dt>
41
<div class="error">{{ form.caveats.errors }}</div>
49
<div class="error">{{ form.is_published.errors }}</div>
50
{{ form.is_published }}
54
<p><input type="submit"></p>