Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Listwill committed Jun 26, 2016
0 parents commit 7bc3b41
Show file tree
Hide file tree
Showing 784 changed files with 206,078 additions and 0 deletions.
30 changes: 30 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from flask import Flask
from flask import abort
from flask import url_for

app = Flask(__name__)

@app.route('/')
def hello_word():
return 'Hello World !'

@app.route('/user/<username>')
def show_user_profile(username):
# show the user profile for that user
return 'User %s' % username

@app.route('/post/<int:post_id>')
def show_post(post_id):
# show the post with the given id, the id is an integer
return 'Post %d' % post_id


@app.route('/login', methods=['GET', 'POST'])
def login():
if request.method == 'POST':
do_the_login()
else:
show_the_login_form()

if __name__ == '__main__':
app.run(debug=True)
Loading

0 comments on commit 7bc3b41

Please sign in to comment.