Created
May 7, 2014 11:21
-
-
Save InFog/d8c77e0b01f0dfb71c6a to your computer and use it in GitHub Desktop.
Parameters for render_template in Flask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/"): | |
data = [] | |
data["title"] = "My Page" | |
data["description"] = "Just a Page" | |
return render_template("index.html", **data) | |
# Using **kwargs will do this: render_template("index.html", title="My Page", description="Just a Page") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment