diff options
Diffstat (limited to 'tests/basic/models.py')
| -rw-r--r-- | tests/basic/models.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basic/models.py b/tests/basic/models.py index 40de6ae7de..7b2b1aee54 100644 --- a/tests/basic/models.py +++ b/tests/basic/models.py @@ -3,6 +3,8 @@ Bare-bones model This is a basic model with only two non-primary-key fields. """ +import uuid + from django.db import models @@ -40,3 +42,7 @@ class SelfRef(models.Model): # This method intentionally doesn't work for all cases - part # of the test for ticket #20278 return SelfRef.objects.get(selfref=self).pk + + +class PrimaryKeyWithDefault(models.Model): + uuid = models.UUIDField(primary_key=True, default=uuid.uuid4) |
