1{% extends "base.html" %}
2
3{% block content %}
4 <h1>Sign In</h1>
5 <form action="" method="post" novalidate>
6 {{ form.hidden_tag() }}
7 <p>
8 {{ form.username.label }}<br>
9 {{ form.username(size=32) }}
10 </p>
11 <p>
12 {{ form.password.label }}<br>
13 {{ form.password(size=32) }}
14 </p>
15 <p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
16 <p>{{ form.submit() }}</p>
17 </form>
18{% endblock %}
1class PostForm(FlaskForm):
2 title = StringField('Title', validators=[DataRequired()])
3 content = TextAreaField('Content', validators=[DataRequired()])
4 validators=[DataRequired(), Length(min=2, max=50)])
5 submit = SubmitField('Post')