File tree 3 files changed +19
-3
lines changed 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change
1
+ web : gunicorn app:app
Original file line number Diff line number Diff line change 13
13
reload (sys )
14
14
sys .setdefaultencoding ('utf-8' )
15
15
16
- class API (Resource ):
16
+ class APP (Resource ):
17
17
def get (self ):
18
- return {'this is should become a ->' : 'website' }
18
+ return {'this is soon to become an awesome ->' : 'website' }
19
19
20
20
def post (self ):
21
21
jk = joke .getJoke ()
22
22
jk = jk .encode ('ascii' , 'ignore' ).decode ('ascii' )
23
23
#jk = jk.encode('utf-8')
24
24
return jk
25
25
26
- api .add_resource (API , '/' )
26
+ class API (Resource ):
27
+ def get (self ):
28
+ jk = joke .getJoke ()
29
+ jk = jk .encode ('ascii' , 'ignore' ).decode ('ascii' )
30
+ # jk = jk.encode('utf-8')
31
+ return jk
32
+
33
+ api .add_resource (APP , '/' )
34
+ api .add_resource (API , '/api' )
27
35
28
36
if __name__ == '__main__' :
29
37
app .run (debug = True )
Original file line number Diff line number Diff line change
1
+ Flask == 0.11.1
2
+ gunicorn == 19.7.0
3
+ httplib2 == 0.9.2
4
+ Jinja2 == 2.8
5
+ virtualenv == 15.1.0
6
+ Werkzeug == 0.11.10
7
+ flask-restful
You can’t perform that action at this time.
0 commit comments