Registering route on blueprint raises AttributeError: 'function' object has no attribute 'route'
<p>I define a blueprint in <code>app/settings/__init__.py</code>, then import the views to register them.  This raises <code>AttributeError: 'function' object has no attribute 'route'</code>.  Why am I getting this error and how do I fix it?</p>

<pre><code>from flask import Blueprint

settings = Blueprint('settings', __name__, template_folder='templates')

from app.settings import views
</code></pre>



<pre><code>Traceback (most recent call last):
  File "E:/surfmi/run.py", line 1, in &lt;module&gt;
    from app import app
  File "E:\surfmi\app\__init__.py", line 34, in &lt;module&gt;
    from app.settings import settings
  File "E:\surfmi\app\settings\__init__.py", line 6, in &lt;module&gt;
    from app.settings import views
  File "E:\surfmi\app\settings\views.py", line 17, in &lt;module&gt;
    @settings.route('/general')
AttributeError: 'function' object has no attribute 'route'
</code></pre>