syncdb = Error: One or more models did not validate
问题 When I do manage.py syncdb I get: Error: One or more models did not validate: users.userprofile: "uuid": Primary key fields cannot have null=True. even though my class UserProfile(models.Model) have: uuid = UUIDField(primary_key=True, auto=True, editable=False) 回答1: The comment from Daniel was probably it, I just didn't know how to follow the clue. The fix, that came from Joshua, was to remove the official django-uuidfield 's and replace them with Joshua's fork. -django-uuidfield==0.4 -django