mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #23919 -- Replaced super(ClassName, self) with super().
This commit is contained in:
parent
dc165ec8e5
commit
d6eaf7c018
339 changed files with 1221 additions and 1296 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue