title: Low Security Password/Username Concept Flask Security Error
body: <p>Basically just trying to make a simple login page that has pretty much no security but keep getting internal server errors, any help with where I'm going wrong would be much appreciated. I've tried searching around but I can't find anything. I'm also pretty new to Python, so go easy :)</p>
  
  <p>Python/Flask:</p>
  
  <pre><code>@app.route('/adminlogin')
  def admin():
      return render_template('adminlogin.html')
  
  @app.route('/adminDetails', methods =['POST'])  
      def adminLogin():
          correctUser = 'admin'
          correctPass = 'Password1'
          username = request.form['username']
          password = request.form['password']
  
      if username == correctUser &amp; password == correctPass:
          adminSuccess()
      else: 
          admin()
  
  
  @app.route('/admin')
  def adminSuccess():
      return render_template('admin.html')
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form action="/adminDetails" method="post"&gt;
          Username&lt;input name="username" type = "text" maxlength="32" size="12" placeholder="Username" required&gt;&lt;br&gt;
          Password&lt;input name ="password" type="password" maxlength="20" size="12" placeholder="Password" required&gt;&lt;br&gt;
          &lt;button class ="menuitem" type="submit" value="submit"&gt;Submit&lt;/button&gt;
          &lt;button class="menuitem" type ="reset" value ="Clear"&gt;Clear&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Traceback:</p>
  
  <pre><code> Traceback (most recent call last):
        File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-    packages\flask\app.py", line 1836, in __call__ 
      return self.wsgi_app(environ, start_response)
    File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\app.py", line 1820, in wsgi_app
      response = self.make_response(self.handle_exception(e))
    File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\app.py", line 1403, in handle_exception
      reraise(exc_type, exc_value, tb)
    File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\_compat.py", line 33, in reraise
      raise value
    File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\app.py", line 1817, in wsgi_app
      response = self.full_dispatch_request()
    File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\app.py", line 1478, in full_dispatch_request
      response = self.make_response(rv)
    File "C:\Users\\AppData\Local\Programs\Python\Python35-32\lib\site-packages\flask\app.py", line 1566, in make_response
          raise ValueError('View function did not return a response')
      ValueError: View function did not return a response
  </code></pre>