Is there a simple way to remove duplicates in the following basic query:
email_list = Emails.objects.order_by(\'email\')
I tried using
I used the following to actually remove the duplicate entries from from the database, hopefully this helps someone else.
adds = Address.objects.all() d = adds.distinct('latitude', 'longitude') for address in adds: if i not in d: address.delete()