Skip to content

Instantly share code, notes, and snippets.

@doobeh
Created July 26, 2012 19:42
Show Gist options
  • Save doobeh/3184080 to your computer and use it in GitHub Desktop.
Save doobeh/3184080 to your computer and use it in GitHub Desktop.
from flask import Flask, render_template, abort, current_app
app = Flask(__name__)
@app.route('/')
def home():
return 'home'
from bp import mod
app.register_blueprint(mod,cows='moo')
if __name__ == '__main__':
app.run(debug=True)
from flask import Blueprint, jsonify, current_app
mod = Blueprint('test', __name__, url_prefix='/test',template_folder='templates')
@mod.record
def recorder(test):
mod.options = test.options
@mod.route('/')
def test():
return jsonify(mod.options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment