Created
May 31, 2012 16:39
-
-
Save davidwtbuxton/2844639 to your computer and use it in GitHub Desktop.
Flask with more than one template folder
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
import jinja2 | |
import flask | |
app = flask.Flask(__name__) | |
custom_loader = jinja2.ChoiceLoader([ | |
# Re-use the default template dir first | |
app.jinja_loader, | |
# And add a new shared template dir | |
jinja2.FileSystemLoader('/path2'), | |
]) | |
app.jinja_loader = custom_loader |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment