-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
32 lines (28 loc) · 1.53 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
from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
import os
import models
from twidao import MainPage, SignupPage, SettingPage, AvatarsHandler, NotFoundPage, UserPage, StatusPage, ActionHandler, FavoritesPage, RepliesPage, DirectsPage
# Copyright (C) 2010-2012 vvoody <[email protected]>
# Souce codes licensed under GPLv3, see LICENSE.
application = webapp.WSGIApplication([('/', MainPage),
('/signup', SignupPage),
('/setting', SettingPage),
('/avatar/([^/]*)', AvatarsHandler),
('/avatar/(.*)/(.*)', AvatarsHandler),
('/notfound', NotFoundPage),
('/status/(\w+)/([0-9]+)', StatusPage),
('/favorites', FavoritesPage),
('/replies', RepliesPage),
('/directs', DirectsPage),
('/(follow|unfollow)/(\w+)',ActionHandler),
('/(del|fav|unfav)/(\d+)', ActionHandler),
('/(\w+)', UserPage),
('/.*', NotFoundPage),], debug=True)
def main():
run_wsgi_app(application)
if __name__ == '__main__':
main()