diff --git a/greg/models.py b/greg/models.py index e2af784fe6751bbb727def62a9bbf0a132d02889..1d96f92219510818c72460b73b4150fdd38dfe68 100644 --- a/greg/models.py +++ b/greg/models.py @@ -6,26 +6,12 @@ from typing import Optional from dirtyfields import DirtyFieldsMixin from django.conf import settings from django.db import models -from django.db.models import Lookup, Q -from django.db.models.fields import Field +from django.db.models import Q from django.utils import timezone from greg.managers import PersonManager -@Field.register_lookup -class Like(Lookup): - """Allows doing LIKE comparisons when querying.""" - - lookup_name = "like" - - def as_sql(self, compiler, connection): - lhs, lhs_params = self.process_lhs(compiler, connection) - rhs, rhs_params = self.process_rhs(compiler, connection) - params = lhs_params + rhs_params - return "%s LIKE %s" % (lhs, rhs), params - - class BaseModel(DirtyFieldsMixin, models.Model): """Common fields for all models."""