|
@@ -32,7 +32,7 @@ load_proxy, unit_price = get_classes('offer.utils', ['load_proxy', 'unit_price']
|
32
|
32
|
class ReverseStartsWith(StartsWith):
|
33
|
33
|
"""
|
34
|
34
|
Adds a new lookup method to the django query language, that allows the
|
35
|
|
- folowing syntax::
|
|
35
|
+ following syntax::
|
36
|
36
|
|
37
|
37
|
henk_rstartswith="koe"
|
38
|
38
|
|
|
@@ -53,12 +53,12 @@ class ReverseStartsWith(StartsWith):
|
53
|
53
|
based on that their depth starts with the depth string of the parent.
|
54
|
54
|
"""
|
55
|
55
|
def process_rhs(self, compiler, connection):
|
56
|
|
- return super(ReverseStartsWith, self).process_lhs(compiler, connection)
|
|
56
|
+ return super().process_lhs(compiler, connection)
|
57
|
57
|
|
58
|
58
|
def process_lhs(self, compiler, connection, lhs=None):
|
59
|
59
|
if lhs is not None:
|
60
|
60
|
raise Exception("Flipped process_lhs does not accept lhs argument")
|
61
|
|
- return super(ReverseStartsWith, self).process_rhs(compiler, connection)
|
|
61
|
+ return super().process_rhs(compiler, connection)
|
62
|
62
|
|
63
|
63
|
|
64
|
64
|
Field.register_lookup(ReverseStartsWith, "rstartswith")
|