Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django model remove duplicates

from django.db.models import Count
from app.models import Email

duplicate_emails = Email.objects.values('email').annotate(email_count=Count('email')).filter(email_count__gt=1)
Source by newbedev.com #
 
PREVIOUS NEXT
Tagged: #django #model #remove #duplicates
ADD COMMENT
Topic
Name
7+7 =