Rediect to another page in blueprints
<p>Im looking for a way to redirect to another page while using flask blueprints</p>

<pre><code>from flask import Blueprint, request, render_template, redirect, url_for
import json

user = Blueprint("user",__name__,template_folder='templates')


@user.route("/index")
def index():
    return render_template("index.html")

@user.route("/signup")
def signup():
    return render_template("signup.html")

@user.route("/login")
def login():
    return render_template("login.html")

from models.user_model import User
from app import db

@user.route('/saveuser/', methods=['GET'])
def saveuser():
    username = request.args["username"]
    emailid = request.args["email"]
    password = request.args["password"]
    try:
        u = User(str(username),str(emailid),password=str(password))
        db.session.add(u)
        db.session.commit()
    except Exception, excp:
        return excp
    # return redirect('/index')
    return render_template("index.html")
</code></pre>

<p>In saveuser() I want to redirect to index page if Im able to insert successfully</p>

<p>Use <code>redirect</code> and <code>url_for</code>:</p>

<pre><code>return redirect(url_for('user.index'))
</code></pre>

python flask blueprint