mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
The reverse() added in50aa1a790ccrashed on a custom user model. Backport of5acf203db2from master
11 lines
357 B
Python
11 lines
357 B
Python
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)
|