mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Replaced super(ClassName, self) with super().
This commit is contained in:
@@ -7,7 +7,7 @@ class Cash(decimal.Decimal):
|
||||
currency = 'USD'
|
||||
|
||||
def __str__(self):
|
||||
s = super(Cash, self).__str__(self)
|
||||
s = super().__str__(self)
|
||||
return '%s %s' % (s, self.currency)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class CashField(models.DecimalField):
|
||||
def __init__(self, **kwargs):
|
||||
kwargs['max_digits'] = 20
|
||||
kwargs['decimal_places'] = 2
|
||||
super(CashField, self).__init__(**kwargs)
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def from_db_value(self, value, expression, connection, context):
|
||||
cash = Cash(value)
|
||||
|
||||
Reference in New Issue
Block a user