mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #21013 -- Ensure that ModelAdmin.get_queryset is considered for the admin history view.
This commit is contained in:
committed by
Julien Phalip
parent
e192739b3e
commit
04415bf81b
@@ -693,3 +693,14 @@ class Simple(models.Model):
|
||||
class Choice(models.Model):
|
||||
choice = models.IntegerField(blank=True, null=True,
|
||||
choices=((1, 'Yes'), (0, 'No'), (None, 'No opinion')))
|
||||
|
||||
class _Manager(models.Manager):
|
||||
def get_queryset(self):
|
||||
return super(_Manager, self).get_queryset().filter(pk__gt=1)
|
||||
|
||||
class FilteredManager(models.Model):
|
||||
def __str__(self):
|
||||
return "PK=%d" % self.pk
|
||||
|
||||
pk_gt_1 = _Manager()
|
||||
objects = models.Manager()
|
||||
|
||||
Reference in New Issue
Block a user