/
whoa.py
29 lines (22 loc) · 825 Bytes
/
whoa.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
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from webapp2 import Route, WSGIApplication
from webapp2_extras import routes
import settings
import handlers
mapping = [
Route(r'/', handlers.simple.Home, name='home'),
Route(r'/about', handlers.simple.About, name='about'),
Route(r'/lore', handlers.simple.Lore, name='lore'),
routes.PathPrefixRoute(r'/account', handlers.account.routes),
routes.PathPrefixRoute(r'/members', handlers.members.routes),
#Route(r'/static/<path:.*>', handlers.base.StaticHandler,
# name='static'),
routes.PathPrefixRoute(r'/<:(admin|system)>', handlers.admin.routes),
]
debug = not settings.is_production()
application = WSGIApplication(mapping, debug=debug)
def main():
application.run()
if __name__ == '__main__':
main()