-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
48 lines (44 loc) · 1.5 KB
/
main.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
42
43
44
45
46
47
48
import webapp2
import mfb.admin as admin
import mfb.handlers as main
config = {
'webapp2_extras.auth': {
'user_model': 'mfb.models.User',
'user_attributes': ['auth_ids', 'admin'],
},
'webapp2_extras.sessions': {
'secret_key': 'THISKEYISSUCHASECRET',
}
}
app = webapp2.WSGIApplication([
('/_a/restaurants', admin.Restaurants),
(r'/_a/restaurant/(.*)', admin.RestaurantPage),
('/_a/cards', admin.Cards),
('/_a/prompts', admin.Prompts),
('/_a/hand', admin.CardHand),
('/_a/itemvote', admin.ItemVote),
('/_a/signup', admin.SignupHandler),
('/_a/login', admin.LoginHandler),
('/_a/logout', admin.LogoutHandler),
('/_a/editable', admin.Editable),
('/_a/ajax', admin.AjaxHandler),
('/_a/delete', admin.Delete),
('/_a/password', admin.Password),
('/_a/maintain', admin.Maintain),
webapp2.Route('/_a', admin.MainHandler, name="home"),
('/signup', main.SignupHandler),
('/login', main.LoginHandler),
('/logout', main.LogoutHandler),
('/restaurants', main.Restaurants),
('/items/(.*)', main.Items),
('/items', main.Items),
('/vote/(.*)', main.Vote),
('/votenew/(.*)', main.VoteNew),
('/feed', main.Feed),
('/find', main.FindPeople),
('/review/(.*)', main.ReviewPage),
('/profile/(.*)/followers', main.Followers),
('/profile/(.*)/following', main.Following),
('/profile/(.*)', main.Profile), #profile?profileid
('/', main.MainHandler),
], debug=True, config=config)