Is it possible to use AngularJS with the Jinja2 template engine?

You have some options. 1) Change the delimiter notation for Angular: var app = angular.module(‘Application’, []); app.config([‘$interpolateProvider’, function($interpolateProvider) { $interpolateProvider.startSymbol(‘{a’); $interpolateProvider.endSymbol(‘a}’); }]); Whatever is chosen for the start and end symbols will act as the new delimiters. In this case, you would express a variable to Angular using {a some_variable a}. This approach has the … Read more

Django: Switching to Jinja2?

While it’s just my own experience, I found converting from Django to Jinja2 to be worthwhile for the following reasons: The design and implementation of Jinja2 seemed more intuitive to me, both as a software developer and template designer; Jinja2 is more extensible (at least in the ways I’ve sought to extend my template engine); … Read more

jinja2.exceptions.TemplateNotFound error [duplicate]

You put your template in the wrong place. From the Flask docs: Flask will look for templates in the templates folder. So if your application is a module, this folder is next to that module, if it’s a package it’s actually inside your package: See the docs for more information: http://flask.pocoo.org/docs/quickstart/#rendering-templates

Using sass with Flask and jinja2

Flask-Assets extension (which uses webassets library) can be used for that. Here’s how to configure it to use pyScss compiler (implemented in Python) for SCSS: from flask import Flask, render_template from flask.ext.assets import Environment, Bundle app = Flask(__name__) assets = Environment(app) assets.url = app.static_url_path scss = Bundle(‘foo.scss’, ‘bar.scss’, filters=”pyscss”, output=”all.css”) assets.register(‘scss_all’, scss) And in the … Read more

Flask Template Not found [duplicate]

By default, Flask looks in the templates folder in the root level of your app. http://flask.pocoo.org/docs/0.10/api/ template_folder – the folder that contains the templates that should be used by the application. Defaults to ‘templates’ folder in the root path of the application. So you have some options, rename template to templates supply a template_folder param … Read more