forked from sefakilic/udacity-cs253
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helloworld.py
25 lines (22 loc) · 1.04 KB
/
helloworld.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
import webapp2
import rot13
import signup
import blog
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers["Content-Type"] = "text/plain"
self.response.write("Hello, Udacity!")
app = webapp2.WSGIApplication([("/?", MainPage),
("/rot13/?", rot13.Rot13),
("/blog/signup/?", signup.Signup),
("/blog/login/?", signup.Login),
("/blog/logout/?", signup.Logout),
("/blog/welcome/?", signup.Welcome),
("/blog/?", blog.Blog),
("/blog/([0-9]+)/?", blog.Post),
("/blog/newpost/?", blog.NewPost),
#json
(("/blog/.json"), blog.BlogJSON),
(("/blog/([0-9]+).json"), blog.PostJSON),
("/blog/flush/?", blog.FlushCache)],
debug=True)