Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Dropdown -->
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
- Beer
- </a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{{ url_for('indianBeer') }}">Indian Beer</a>
- <a class="dropdown-item" href="#">Imported Beer</a>
- </div>
- </li>
- from flask import Flask, request, url_for, redirect
- app = Flask(__name__)
- @app.route("/")
- def main():
- return render_template('new_index.html')
- @app.route('/indian_beer1',methods=['GET','POST'])
- def indianBeer():
- if request.method == 'POST':
- return redirect(url_for('new_index.html'))
- return render_template('indian_beer1.html')
- if __name__ == "__main__":
- app.run(debug=True)
Add Comment
Please, Sign In to add comment