The following works for me --
email_list = EmailList.objects.get(domain=(cd['email'].split('@')[1]))
But defining the 'domain' variable before does not --
domain = cd['email'].split('@')[1]
email_list = EmailList.objects.get(domain=domain)
When I do the latter, it raises an "EmailList matching query does not exist". What accounts for this difference??