Created
September 14, 2013 03:54
-
-
Save gjo/6558691 to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
# http://flask.pocoo.org/docs/quickstart/#a-minimal-application | |
# から | |
# http://flask.pocoo.org/docs/quickstart/#variable-rules | |
# までを写経していくと | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return 'Index Page' | |
@app.route('/hello') | |
def hello(): | |
return 'Hello World' | |
@app.route('/user/<username>') | |
def show_user_profile(username): | |
# show the user profile for that user | |
return 'User %s' % username | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment