django1/tests/auth_tests/models/uuid_pk.py

14 lines
409 B
Python
Raw Normal View History

import uuid
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.tests.custom_user import RemoveGroupsAndPermissions
from django.db import models
with RemoveGroupsAndPermissions():
class UUIDUser(AbstractUser):
"""A user with a UUID as primary key"""
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
class Meta:
app_label = 'auth'