Add hidden tags with CSRF field to forms

master
Steven Loria 11 years ago
parent a13164855b
commit b7a7994284
  1. 1
      {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/_layouts/nav.html
  2. 1
      {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/register.html

@ -30,6 +30,7 @@
<li><a href="{{ url_for('register') }}">Create account</a></li> <li><a href="{{ url_for('register') }}">Create account</a></li>
</ul> </ul>
<form method="POST" class="navbar-form form-inline navbar-right" action="" role="login"> <form method="POST" class="navbar-form form-inline navbar-right" action="" role="login">
{{ form.hidden_tag() }}
<div class="form-group"> <div class="form-group">
{{ form.username(placeholder="Username", class_="form-control") }} {{ form.username(placeholder="Username", class_="form-control") }}
{{ form.password(placeholder="Password", class_="form-control") }} {{ form.password(placeholder="Password", class_="form-control") }}

@ -5,6 +5,7 @@
<h1>Register</h1> <h1>Register</h1>
<br/> <br/>
<form class="form form-register" method="POST" action="" role="form"> <form class="form form-register" method="POST" action="" role="form">
{{ form.hidden_tag() }}
<div class="form-group"> <div class="form-group">
{{form.username.label}} {{form.username.label}}
{{form.username(placeholder="Username", class_="form-control")}} {{form.username(placeholder="Username", class_="form-control")}}

Loading…
Cancel
Save