1👍
✅
Try this query:
from django.db.models import Func
self.queryset.objects.annotate(customer_phone=Func(F('phone'), Value('[^0-9]'), Value(''), Value('g'), function='REGEXP_REPLACE', output_field=models.CharField()))
Source:stackexchange.com