diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-04-01 15:11:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-01 15:11:54 +0200 |
| commit | 7cbcf2e2cbca1acfccfd973f746a9e6abfc0052e (patch) | |
| tree | b1872a31250529897a367910e582c9e42a75f2b7 /tests/admin_views/models.py | |
| parent | 93daed25a41b5cf2f7804d91630caa1cd0786a9a (diff) | |
Fixed #30259 -- Fixed crash of admin views when properties don't have admin_order_field attribute.
Diffstat (limited to 'tests/admin_views/models.py')
| -rw-r--r-- | tests/admin_views/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/admin_views/models.py b/tests/admin_views/models.py index aaf86ea1cd..9ac3c53bab 100644 --- a/tests/admin_views/models.py +++ b/tests/admin_views/models.py @@ -60,6 +60,10 @@ class Article(models.Model): property_year.admin_order_field = 'date' model_property_year = property(property_year) + @property + def model_month(self): + return self.date.month + class Book(models.Model): """ |
