-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.py
22 lines (21 loc) · 1.13 KB
/
routes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import webapp2
from handlers import HomePage, NewPostPage, PostPermalinkPage
from handlers import WelcomePage, SignupPage, LoginPage, LogoutHandler
from handlers import PostEditPage, NewCommentPage, CreditsPage, EditCommentPage
COMMON_ROUTES = [
webapp2.Route('/', HomePage, name="home"),
webapp2.Route('/blog', HomePage, name="home"),
webapp2.Route('/blog/', HomePage, name="home"),
webapp2.Route('/blog/<post_id:\d+>', PostPermalinkPage, name="permalink"),
webapp2.Route('/blog/newpost', NewPostPage, name="newpost"),
webapp2.Route('/blog/<post_id:\d+>/newcomment', NewCommentPage,
name="newcomment"),
webapp2.Route('/blog/welcome', WelcomePage, name="welcome"),
webapp2.Route('/blog/signup', SignupPage, name="signup"),
webapp2.Route('/blog/login', LoginPage, name="login"),
webapp2.Route('/blog/logout', LogoutHandler, name="logout"),
webapp2.Route('/blog/edit/<post_id:\d+>', PostEditPage, name="post_edit"),
webapp2.Route('/blog/edit/comment/<comment_id:\d+>', EditCommentPage,
name="comment_edit"),
webapp2.Route('/credits', CreditsPage, name="credits"),
]