-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use plim in flask, bottle etc. #37
Comments
Hello! I apologise for a late response. Unfortunatelly I've never used Flask and cannot provide you a working configuration example. I will get back to this ticket once I have spare time to answer it in full. P.S. Contributions into documentation with regard to this subject are highly appreciated. |
Thanks |
I am currently toying around with this too and a basic working example is this app.py @hyao: from flask import Flask
from flask.ext.mako import MakoTemplates, render_template
from plim import preprocessor
app = Flask(__name__)
mako = MakoTemplates(app)
app.config['MAKO_PREPROCESSOR'] = preprocessor
@app.route('/')
def hello():
return render_template('hello.html', name='mako')
if __name__ == "__main__":
app.run(debug=True) and the template file templates/hello.html: doctype html
html
head
title hello ${name}
body
p hello ${name} What is missing is some nice integration ala pyjade where you basically add a line and then you are able to render ".jade" files using the default render_template of flask. I have no idea if something like that would be feasible though due to the reliance on jinja for rendering. |
Being able to render .plim files like pyjade does would be super as well! :) |
Can be closed as #38 is merged. |
Hi,
I'm trying to get plim working with flask via flask-mako (http://pythonhosted.org//Flask-Mako/), but couldn't get it to work:
Could you take a look when you have the time and maybe add some docs for flask, bottle as well; plim seems really nice to use :)
Thanks a lot,
The text was updated successfully, but these errors were encountered: