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

Fixed #26184 -- Allowed using any lookups in ModelAdmin.search_fields.

Thanks Krzysztof Nazarewski for the initial patch.
This commit is contained in:
Krzysztof Nazarewski
2017-07-05 13:00:10 +02:00
committed by Tim Graham
parent 3af305e8b8
commit 244cc40155
7 changed files with 143 additions and 65 deletions

View File

@@ -28,6 +28,7 @@ class Band(models.Model):
class Musician(models.Model):
name = models.CharField(max_length=30)
age = models.IntegerField(null=True, blank=True)
def __str__(self):
return self.name
@@ -111,3 +112,7 @@ class OrderedObject(models.Model):
class CustomIdUser(models.Model):
uuid = models.AutoField(primary_key=True)
class CharPK(models.Model):
char_pk = models.CharField(max_length=100, primary_key=True)