title: how to call @app.before_request
body: <p>I have a simple flask app and I want to use @app.before_request, but somehow it does not work! I am sure I am not thinking correctly about this!
  apparently it will be called upon using something like:</p>
  
  <pre><code>return redirect(url_for('index'))
  </code></pre>
  
  <p>but i need it to be called for:</p>
  
  <pre><code>return render_template('index.html')
  </code></pre>
  
  <p>can anybody help?</p>