title: Can't import LoginManager() in Flask
body: <p>I am using Flask BluePrint in my applications and have to main parts: 1. Admin and 2. Public. When I try to import the loginManager to my views.py file I get the error <strong>ImportError: cannot import name lm</strong> <br/>
  my folder structure is like:</p>
  
  <pre><code>~/LargeApplication
      |-- run.py
      |-- config.py
      |__ /env             # Virtual Environment
      |__ /app             # Application Module
           |-- __init__.py
           |-- models.py
           |-- /admin
               |-- __init__.py
               |-- views.py                
           |__ /templates
               |-- ..
      |__ ..
      |__ .
  </code></pre>
  
  <p>I do initialize the LoginManager() in __ init__ .py file
  /app/__ init__ .py</p>
  
  <pre><code>from flask.ext.login import LoginManager
  lm = LoginManager()
  lm.init_app(app)
  lm.login_view = 'login'
  </code></pre>
  
  <p>and when I try to import <strong>lm</strong> in /app/admin/views.py</p>
  
  <pre><code>from app import lm
  </code></pre>
  
  <p>it raises ImportError.</p>
  
  <pre><code>ImportError: cannot import name lm
  </code></pre>
  
  <p>Can you please tell what might be the issue? </p>