forked from ruhan/dclpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
52 lines (34 loc) · 1.19 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: utf-8 -*-
from controller import *
from dclpy import *
class Main:
def start_system(self):
#c = Controller("Home")
#c.dispatch('/')
#c.dispatch('/aereo/')
from a import A
A()
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.mod('A', 'a')
DCL.mod('B', 'b')
DCL.mod('C', 'c')
DCL.mod('D', 'd')
DCL.the('A', CantAccess, 'B')
DCL.the('A', CantCreate, 'B')
DCL.the('B', CantInherit, 'C')
DCL.the('B', MustInherit, 'D')
DCL.only('A', CanInherit, 'D')
DCL.init(report_file='C:\\mestrado\\dclpy\\report.txt')
a = Main().start_system()
# TODO: abstract this. Maybe a context manager can does this
DCL.conclude()
print '\n\n\n'