@@ -7,10 +7,8 @@ class MP_Descendants(Relationship):
7
7
def __init__ (self , ** kwargs ):
8
8
kwargs .setdefault ("related_name" , "ascendants" )
9
9
kwargs .update (
10
- {
11
- "to" : "self" ,
12
- "predicate" : Q (path__startswith = L ("path" ), path__ne = L ("path" )),
13
- }
10
+ to = "self" ,
11
+ predicate = Q (path__startswith = L ("path" ), path__ne = L ("path" )),
14
12
)
15
13
super (MP_Descendants , self ).__init__ (** kwargs )
16
14
@@ -19,7 +17,8 @@ class MP_Subtree(Relationship):
19
17
def __init__ (self , ** kwargs ):
20
18
kwargs .setdefault ("related_name" , "rootpath" )
21
19
kwargs .update (
22
- {"to" : "self" , "predicate" : Q (path__startswith = L ("path" )),}
20
+ to = "self" ,
21
+ predicate = Q (path__startswith = L ("path" )),
23
22
)
24
23
super (MP_Subtree , self ).__init__ (** kwargs )
25
24
@@ -28,12 +27,12 @@ class NS_Descendants(Relationship):
28
27
def __init__ (self , ** kwargs ):
29
28
kwargs .setdefault ("related_name" , "ascendants" )
30
29
kwargs .update (
31
- {
32
- "to" : "self" ,
33
- "predicate" : Q (
34
- tree_id = L ( "tree_id" ), lft__gt = L ("lft" ), lft__lt = L ( "rgt " ),
35
- ),
36
- }
30
+ to = "self" ,
31
+ predicate = Q (
32
+ tree_id = L ( "tree_id" ),
33
+ lft__gt = L ("lft" ),
34
+ lft__lt = L ( "rgt" ),
35
+ ),
37
36
)
38
37
super (NS_Descendants , self ).__init__ (** kwargs )
39
38
@@ -42,11 +41,11 @@ class NS_Subtree(Relationship):
42
41
def __init__ (self , ** kwargs ):
43
42
kwargs .setdefault ("related_name" , "rootpath" )
44
43
kwargs .update (
45
- {
46
- "to" : "self" ,
47
- "predicate" : Q (
48
- tree_id = L ( "tree_id" ), lft__gte = L ("lft" ), lft__lt = L ( "rgt " ),
49
- ),
50
- }
44
+ to = "self" ,
45
+ predicate = Q (
46
+ tree_id = L ( "tree_id" ),
47
+ lft__gte = L ("lft" ),
48
+ lft__lt = L ( "rgt" ),
49
+ ),
51
50
)
52
51
super (NS_Subtree , self ).__init__ (** kwargs )
0 commit comments