Skip to content

Instantly share code, notes, and snippets.

View pvanliefland's full-sized avatar

Pierre Vanliefland pvanliefland

View GitHub Profile
@pvanliefland
pvanliefland / app.py
Last active December 19, 2015 19:49
Using a custom json encoder (lazy strings)
from flask import Flask
from flask.ext.babel import Babel
from utils import LazyAwareJSONEncoder
app = Flask(__name__, static_url_path='')
app.config.from_pyfile(app.root_path + '/config.cfg')
app.json_encoder = LazyAwareJSONEncoder
@pvanliefland
pvanliefland / app.py
Created June 10, 2013 21:25
Flask view import problem
from flask import Flask, request, render_template
import config, database
app = Flask(__name__)
app.debug = config.DEBUG
import views
if __name__ == "__main__":
app.run()