mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #24485 -- Allowed combined expressions to set output_field
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user