mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #15961 -- Modified ModelAdmin to allow for custom search methods.
This adds a get_search_results method that users can override to provide custom search strategies. Thanks to Daniele Procida for help with the docs.
This commit is contained in:
@@ -591,6 +591,12 @@ class ComplexSortedPerson(models.Model):
|
||||
age = models.PositiveIntegerField()
|
||||
is_employee = models.NullBooleanField()
|
||||
|
||||
|
||||
class PluggableSearchPerson(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
age = models.PositiveIntegerField()
|
||||
|
||||
|
||||
class PrePopulatedPostLargeSlug(models.Model):
|
||||
"""
|
||||
Regression test for #15938: a large max_length for the slugfield must not
|
||||
|
||||
Reference in New Issue
Block a user