title: request not going through
body: <p>im creating a login page the code im posting doesnt give any errors   <pre>if request.method == 'POST' and formLogin.validate():
          if formLogin.username_signin == 'admin' and formLogin.password_signin == 'admin':
              return redirect(url_for('home')) </pre></p>
  
  <p>this piece of code gets skipped even when i put admin in box boxes(wtforms) here is the code im using:</p>
  
  <pre><code>app = Flask(__name__)
  app.secret_key = 'jjjjjjj'
  
  @app.route('/')
  def home():
      return render_template('home.html')
  
  
  @app.route('/login/', methods=['GET', 'POST'])
  def login():
  
  
      formLogin = LoginForm(request.form)
      error = None
  
      if request.method == 'POST' and formLogin.validate():
          if formLogin.username_signin == 'admin' and formLogin.password_signin == 'admin':
              return redirect(url_for('home'))
          else:
              error = 'Please enter right credentials.'
              return render_template('login.html', error=error, formLogin=formLogin)
  
      return render_template('login.html', error=error, formLogin=formLogin)
  
  
  if __name__ == '__main__':
      app.debug = True
      app.run()
  </code></pre>
  
  <p>my login.html:</p>
  
  <pre><code>{% extends 'base.html' %}
  
   {% block head %}
          &lt;div class='container'&gt;
              &lt;div class='row'&gt;
                  &lt;form method= post action='/login/'&gt;
                      {{ formLogin.username_signin(class='form-control', placeholder='Username') }}
                      {{ formLogin.password_signin(class='form-control', placeholder='Password') }}
                      {{ formLogin.submit_signin(class='btn btn-primary') }}
                  &lt;/form&gt;
                  &lt;p&gt;&lt;strong&gt;Error:&lt;/strong&gt;{{ error }}&lt;/p&gt;
              &lt;/div&gt;    
          &lt;/div&gt;
          {% endblock %}
  </code></pre>
  
  <p>Form.py</p>
  
  <pre><code>from wtforms import Form,StringField, PasswordField, TextField, BooleanField, SubmitField, validators
  
  class LoginForm(Form):  
  
      username_signin = StringField('SigninU', [validators.Required('please enter name')])
      password_signin = PasswordField('signinP', [validators.Required('need password')])
      submit_signin = SubmitField('Signin')
  </code></pre>
  
  <p>Like i said everything renders ok and im not getting a error loading my problem is that when i put 'admin' in both boxes instead of redirect me to the home() function it just skips straight to the else statement.</p>