-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
20 lines (17 loc) · 785 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# import libraries
import webapp2
# import app files
import blog
class MainPage(blog.BaseHandler):
def get(self):
self.write('Udacity Web Development CS253')
# map path to handler
app = webapp2.WSGIApplication([ ('/', blog.FrontPage),
('/signup', blog.RegisterHandler),
('/login', blog.LoginHandler),
('/logout', blog.LogoutHandler),
('/newpost', blog.NewPost),
('/([0-9]+)', blog.Permalink),
('/.json', blog.BlogJsonHandler),
('/([0-9]+).json', blog.PermalinkJsonHandler),
('/flush', blog.FlushHandler)], debug=True)