-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.py
executable file
·35 lines (28 loc) · 1.24 KB
/
application.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
from organism import Organism
from organism.lucy.router import Router
from organism.lucy.cookies import CookieHandler
from organism.lucy.sessions import RedisSessions
from organism.lucy.requestparser import RequestParser
from organism.lucy.views import Jinja2View
from organism.lucy.authorization import AuthorizationHandler
from rodeo.controllers.home import HomeController
from rodeo.controllers.catchall import CatchAllController
from rodeo.views import RodeoViewEngine
critter = {"router":Router,
"request_parser":RequestParser,
"cookies":CookieHandler,
"sessions":RedisSessions,
"autorization":AuthorizationHandler,
"views":Jinja2View}
organism = Organism(critter)
router = organism.router
router.map_route(label = "HomePage",
path = r"^/$",
object = {"controller":HomeController, "action":"index"})
router.map_route(label = "CatchAll",
path = r".*",
object = {"controller":CatchAllController, "action":"index"})
#router.map_route(name = "Settings",
# method = "GET",
# path = "/settings",
# object = {"controller":SettingsController, "action":"index"})