title: Flask python assertion error: unimplemented method 'GET'
body: <p>Can someone please explain to me the difference between these two blocks of code. The first one works while the latter throws the error which I've indicated in the title.</p>
  
  <pre><code>def login_required(method):
  @functools.wraps(method)
  def wrapper(*args, **kwargs):
      if 'username' in flask.session:
          return method(*args, **kwargs)
      else:
          flask.flash("A login is required to see the page!")
          return flask.redirect(flask.url_for('index'))
  return wrapper
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>def login_required(method):
  @functools.wraps(method)
  def wrapper(*args,**kwargs):
      if "username" in flask.session:
          return method(*args,**kwargs)
      else:
          flask.flash("A login is required to see the page!")
          return flask.redirect(flask.url_for('index'))
      return wrapper
  </code></pre>