diff options
| author | Bozidar Benko <bbenko@gmail.com> | 2013-05-19 10:52:29 +0200 |
|---|---|---|
| committer | Bozidar Benko <bbenko@gmail.com> | 2013-05-19 16:45:00 +0200 |
| commit | 2d309a7043e3625cfeeadbc252322e5599dfffc0 (patch) | |
| tree | 4a5e8709da6e441bc9503939bfdaec7b306c2ec7 /tests/admin_views/models.py | |
| parent | b06f6c1618a64cbab9a7d09a169c75fdf0a8dda8 (diff) | |
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.
Diffstat (limited to 'tests/admin_views/models.py')
| -rw-r--r-- | tests/admin_views/models.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/admin_views/models.py b/tests/admin_views/models.py index 1916949f63..e78dc40a6c 100644 --- a/tests/admin_views/models.py +++ b/tests/admin_views/models.py @@ -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 |
