-
Notifications
You must be signed in to change notification settings - Fork 3
/
sample.py
41 lines (34 loc) · 813 Bytes
/
sample.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from flask import Flask, redirect
import flask.ext.color
app = Flask(__name__)
app.config['DEBUG'] = True
flask.ext.color.init_app(app)
@app.route('/', methods=['GET', 'POST'])
def hello_world():
import time
time.sleep(0.7)
return """
<html>
<img src="/favicon.ico" />
<img src="/static/graphics.png" />
<img src="/static/style.css" />
<img src="/static/theme.css" />
<img src="/static/awesome.css" />
<img src="/auth/users/login" />
<img src="/callback" />
<form action="/" method="post">
<input type="submit" />
</form>
</html>
"""
@app.route('/auth/users/login')
def r():
return 'Hello World!'
@app.route('/static/<example>')
def lol(example):
return 'Hello World!'
@app.route('/callback')
def asd():
return redirect('/static/fffefe')
if __name__ == '__main__':
app.run()