I need to have a CharField
with custom __eq__
function so that when I run model_class.objects.filter(id=something)
instead of just checking equality of both strings, my custom __eq__
function should be run. Or is there any other way to implement the same equality check other than creating a custom __eq__
function.
[Edit]
My custom __eq__
function involves cutting the string into various sections and evaluating each section differently. My point is, it does not have an equivalent SQL statement.