Created
July 26, 2012 19:42
-
-
Save doobeh/3184080 to your computer and use it in GitHub Desktop.
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
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) |
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
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