0

I am new to Flask and building a web app that uses Flask and AngularJS. My understanding is that the static directory is the place to store AngularJS files like javascript and templates.

I wonder if there is a stable alternative to Html/Jinja that I can use for templates. And if there is, how can I enable it to work with template files inside the static directory?

I was looking to PyJade but didn't get how to get it working with the web assets pipeline.

Would appreciate any example or recommendation.

kpax
  • 621
  • 1
  • 8
  • 18

2 Answers2

0

You could use Mako. See here how to install and use it. Also you could use Genshi.

doru
  • 9,022
  • 2
  • 33
  • 43
0

Hi @user3745936 I'm Syrus, creator of pyjade. What is the code you are trying to use?

Syrus Akbary Nieto
  • 1,249
  • 12
  • 20
  • Hi Syrus, I think I found an acceptable solution. I can serve AngularJS templates from the templates directory instead of the static directory, so I can run them through the jinjia pipeline and should be able to define the templates in PyJade. `@bp.route('/partials/') def partial(path): return flask.render_template('/demo/partials/{}'.format(path))` – kpax Apr 06 '15 at 21:58
  • BTW, how stable and feature complete is PyJade? Do you people using it in PROD? – kpax Apr 06 '15 at 22:03