0

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)
4

1 に答える 1

0

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-uuidfield-2==0.6.5
+# django-uuidfield==0.4
+# django-uuidfield-2==0.6.5
+-e git://github.com/joshuakarjala/django-uuidfield.git#egg=django-uuidfield

Remember to pip uninstall django-uuidfield and pip uninstall django-uuidfield-2 before pip install -r requirements.txt.

于 2012-12-13T12:33:37.547 に答える