mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #25165 -- Fixed JSON serialization for add/edit popup in the admin.
Forwardport of test in o839d71d8562abe0b245024e55ca1d02a45e58fd from stable/1.9.x (refs #25997).
This commit is contained in:
committed by
Tim Graham
parent
822a03b3e4
commit
ade54ffa34
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
||||
import datetime
|
||||
import os
|
||||
import tempfile
|
||||
import uuid
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.contenttypes.fields import (
|
||||
@@ -956,3 +957,15 @@ class ReferencedByGenRel(models.Model):
|
||||
|
||||
class GenRelReference(models.Model):
|
||||
references = GenericRelation(ReferencedByGenRel)
|
||||
|
||||
|
||||
class ParentWithUUIDPK(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
title = models.CharField(max_length=100)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.id)
|
||||
|
||||
|
||||
class RelatedWithUUIDPKModel(models.Model):
|
||||
parent = models.ForeignKey(ParentWithUUIDPK, on_delete=models.CASCADE)
|
||||
|
||||
Reference in New Issue
Block a user