1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #20777 -- Admin proxy model deletion regression

Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
This commit is contained in:
Anssi Kääriäinen
2013-08-15 10:32:54 +03:00
parent 4668c142dc
commit 3844089edc
7 changed files with 67 additions and 8 deletions

View File

@@ -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)