forked from baz/app-sales-machine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
26 lines (20 loc) · 742 Bytes
/
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
#!/usr/bin/env python
import wsgiref.handlers
import os
import sys
import settings
from google.appengine.ext import webapp
# Force sys.path to have our own directory first, in case we want to import from it
sys.path.insert(0, settings.APP_ROOT_DIR)
from handlers import admin
def main():
application = webapp.WSGIApplication([('/', admin.RootHandler),
('/admin', admin.RootHandler),
('/admin/upload', admin.UploadHandler),
('/admin/chart', admin.ChartHandler),
('/rankings', admin.RankingsHandler),
('/i', admin.iPhoneHandler),
], debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()