-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
41 lines (25 loc) · 873 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
# -*- coding: utf-8 -*-
from trace import *
from controller import *
from dclpy import *
def start_system():
c = Controller("Home")
c.dispatch('/')
#c.dispatch('/aereo/')
print 'FIM'
#import sys
#sys.exit(0)
if __name__ == "__main__":
DCL.mod('urls_publicas', 'controller')
DCL.mod('modelos', 'models')
DCL.mod('utilidades', 'models')
DCL.the('urls_publicas', CantAccess, 'modelos')
DCL.the('urls_publicas', CantCreate, 'modelos')
DCL.the('urls_publicas', CantAccess, 'utilidades')
DCL.the('modelos', CantInherit, 'modelos')
DCL.only('modelos', CanAccess, 'utilidades')
DCL.the('urls_publicas', MustCreate, 'modelos')
DCL.init()
start_system()
# TODO: abstract this. Maybe a context manager can does this
DCL.conclude()