Flask blueprint url not found
<p>I'm trying to create a flask app using blueprints, so I have this structure:</p>

<pre><code>myapp/
    __init__.py
    static/
    templates/
        site/
            index.html
            register.html
        layout.html
    views/
        __init__.py
        site.py
    models.py
</code></pre>

<p><strong>__init__.py</strong></p>

<pre><code>from flask import Flask
from .views.site import site

app = Flask(__name__)
app.register_blueprint(site)
</code></pre>

<p><strong>views/site.py</strong></p>

<pre><code>from flask import Blueprint, render_template

site = Blueprint('site', __name__)

site.route('/')
def index():
    return render_template('site/index.html')

site.route('/register/')
def register():
    return render_template('site/register.html')
</code></pre>

<p>When I run the app, and try to go to any of the routes I have, the only thing I gest is a "404 Not Found" and I don't really know what I'm doing wrong, because I'm doing exactly what this book says: <a href="http://exploreflask.com/en/latest/blueprints.html" rel="nofollow" title="Explore Flask - Blueprints">Explore Flask - Blueprints</a></p>

<p>Thanks in advance.</p>

<p>You have to prepend <code>@</code> to  <code>site.route</code> like the following.</p>

<pre><code>from flask import Blueprint, render_template

site = Blueprint('site', __name__)

@site.route('/')
def index():
return render_template('site/index.html')

@site.route('/register/')
def register():
    return render_template('site/register.html')
</code></pre>

python flask