This file contains 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 config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
This file contains 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
# Answer to a question on Flask mailing list | |
# http://librelist.com/browser//flask/2012/6/30/using-ajax-with-flask/ | |
# NOTE: *REALLY* don't do the thing with putting the HTML in a global | |
# variable like I have, I just wanted to keep everything in one | |
# file for the sake of completeness of answer. | |
# It's generally a very bad way to do things :) | |
# | |
from flask import (Flask, request, jsonify) | |
app = Flask(__name__) |