diff --git a/odata/property.py b/odata/property.py index 35814ed..2c7fc02 100644 --- a/odata/property.py +++ b/odata/property.py @@ -194,6 +194,16 @@ def endswith(self, value): value = self.escape_value(value) return u'endswith({0}, {1})'.format(self.name, value) + def contains(self, value): + """Extend the StringProperty with contains method""" + value = self.escape_value(value) + return u'contains({0}, {1})'.format(self.name, value) + + def lacks(self, value): + """Does not contain""" + value = self.escape_value(value) + return u'not(contains({0}, {1}))'.format(self.name, value) + class IntegerProperty(PropertyBase): """