只需在任何应用的models.py中使用以下代码
from django.contrib.auth.models import User User._meta.get_field('email')._unique = True