diff options
| author | Josh Smeaton <josh.smeaton@gmail.com> | 2015-03-19 14:07:53 +1100 |
|---|---|---|
| committer | Josh Smeaton <josh.smeaton@gmail.com> | 2015-03-22 17:41:12 +1100 |
| commit | e654123f7fa5b7f04ce5c86bc10689011c8eec69 (patch) | |
| tree | 6a3090c218443e14f9055ea96bd872e30cbc01a5 /tests/annotations/models.py | |
| parent | 3a1886d1113a68794fe36aafd771a7e5db703e24 (diff) | |
Fixed #24485 -- Allowed combined expressions to set output_field
Diffstat (limited to 'tests/annotations/models.py')
| -rw-r--r-- | tests/annotations/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/annotations/models.py b/tests/annotations/models.py index 0c438b99f8..954c8ad339 100644 --- a/tests/annotations/models.py +++ b/tests/annotations/models.py @@ -84,3 +84,12 @@ class Company(models.Model): return ('Company(name=%s, motto=%s, ticker_name=%s, description=%s)' % (self.name, self.motto, self.ticker_name, self.description) ) + + +@python_2_unicode_compatible +class Ticket(models.Model): + active_at = models.DateTimeField() + duration = models.DurationField() + + def __str__(self): + return '{} - {}'.format(self.active_at, self.duration) |
