Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
"Customize Flask to select a template based on some criteria." | |
import os | |
from flask import Flask, request, render_template | |
from flask.helpers import locked_cached_property | |
from jinja2 import FileSystemLoader, TemplateNotFound | |
# Import a detection utility from your project, not defined here. | |
# Takes a request object and returns True if browser is mobile. |
""" | |
Test if a request is XHR. | |
""" | |
import argparse | |
from flask import Flask, request, jsonify, make_response | |
app = Flask(__name__) | |
sudo ln /usr/bin/gcc /usr/bin/gcc-4.2 |
from flask import Flask, send_from_directory | |
app = Flask(__name__) | |
@app.route('/base/<path:filename>') | |
def base_static(filename): | |
return send_from_directory(app.root_path + '/../static/', filename) |
from fabric.api import env, local, require | |
def deploy(): | |
"""fab [environment] deploy""" | |
require('environment') | |
maintenance_on() | |
push() | |
syncdb() | |
migrate() |