-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
41 lines (29 loc) · 896 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
import web
import auth
import controller
from notfoundcontroller import NotFoundController
from profilecontroller import ProfileController
from resumecontroller import ResumeController
from listcontroller import ListController
urls = (
r'/login', 'login',
r'/logout', 'logout',
r'/profile', 'ProfileController',
r'/resume', 'ResumeController',
r'/resume/create', 'ResumeGenerationController',
r'/admin', 'ListController',
r'/admin/(.+)', 'ListController',
r'/', 'IndexController',
)
class IndexController(controller.Controller):
pass
class login(object):
def GET(self):
return auth.login(web.ctx.env.get('HTTP_REFERER'))
class logout(object):
def GET(self):
return auth.logout('/')
application = web.application(urls, globals())
application.notfound = NotFoundController()
app = application.wsgifunc()