title: Flask unable to find templates
body: <p>My project structure is like below</p>
  
  <pre><code>run.py
  lib/
  mysite/
      conf/
          __init__.py (flask app)
          settings.py
      pages/
          templates/
              index.html
          views.py
          __init__.py
  </code></pre>
  
  <p>This is <code>mysite.conf.__init__</code></p>
  
  <pre><code>from flask import Flask
  
  app = Flask(__name__)
  app.debug = True
  </code></pre>
  
  <p>My idea is to now import <code>app</code> to every other module to use it to create views. Here in this case there is a module <code>pages</code>.</p>
  
  <p>In <code>pages.views</code> I have some code like</p>
  
  <pre><code>from flask import render_template
  from mysite.conf import app
  
  @app.route('/')
  def index():
      return render_template('index.html')
  </code></pre>
  
  <p>The <code>index.html</code> is placed in <code>pages/templates</code></p>
  
  <p>When I run this app from <code>run.py</code> which is like below </p>
  
  <pre><code>from mysite.conf import app
  app.run()
  </code></pre>
  
  <p>I'm getting template not found error.
  How to fix it? and why is this happening!</p>
  
  <p>I'm basically a django guy, and facing a lot of inconvenience with importing the <code>wsgi</code> object every time to create a view in every module! It kinda feels crazy -- Which in a way encourages circular imports. Is there any way to avoid this?</p>