Last active
August 29, 2015 14:03
-
-
Save RobinL/ef80ed8b316ac4f23b48 to your computer and use it in GitHub Desktop.
Simple flask
This file contains hidden or 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 | |
app = Flask(__name__) | |
from myapp import myapp as myapp_blueprint | |
app.register_blueprint(myapp_blueprint) | |
if __name__ == '__main__': | |
app.run(debug=True) |
This file contains hidden or 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 | |
myapp = Blueprint('myapp', __name__) | |
from . import views |
This file contains hidden or 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 | |
myapp = Blueprint('myapp', __name__) | |
@myapp.route('/') | |
def index(): | |
return "Hello world" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment