1
0
mirror of https://github.com/django/django.git synced 2025-01-01 05:56:09 +00:00
django/tests/auth_tests/models/uuid_pk.py
Tim Graham 5acf203db2 Fixed #25596 -- Fixed regression in password change view with custom user model.
The reverse() added in 50aa1a790c
crashed on a custom user model.
2015-10-27 08:18:22 -04:00

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)