mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #20777 -- Admin proxy model deletion regression
Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
This commit is contained in:
@@ -117,9 +117,13 @@ class StateProxy(State):
|
||||
|
||||
# Proxy models still works with filters (on related fields)
|
||||
# and select_related, even when mixed with model inheritance
|
||||
@python_2_unicode_compatible
|
||||
class BaseUser(models.Model):
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
def __str__(self):
|
||||
return ':'.join((self.__class__.__name__, self.name,))
|
||||
|
||||
class TrackerUser(BaseUser):
|
||||
status = models.CharField(max_length=50)
|
||||
|
||||
@@ -134,7 +138,7 @@ class Issue(models.Model):
|
||||
assignee = models.ForeignKey(TrackerUser)
|
||||
|
||||
def __str__(self):
|
||||
return ':'.join((self.__class__.__name__,self.summary,))
|
||||
return ':'.join((self.__class__.__name__, self.summary,))
|
||||
|
||||
class Bug(Issue):
|
||||
version = models.CharField(max_length=50)
|
||||
|
||||
Reference in New Issue
Block a user