Improved readability of python code by adding/removing newlines, identation, etc.
This commit is contained in:
parent
0aa8c7f15b
commit
626f596cd3
5 changed files with 10 additions and 21 deletions
|
@ -6,7 +6,6 @@ from django.forms import ValidationError
|
|||
from django.utils import timezone
|
||||
|
||||
|
||||
|
||||
# Custom user model
|
||||
class User(AbstractUser):
|
||||
|
||||
|
@ -24,8 +23,6 @@ class User(AbstractUser):
|
|||
self.email = ""
|
||||
super().save()
|
||||
|
||||
#
|
||||
|
||||
|
||||
class Drink(models.Model):
|
||||
|
||||
|
@ -45,7 +42,8 @@ class Drink(models.Model):
|
|||
self.deleted = True
|
||||
super().save()
|
||||
|
||||
def __str__(self): return f"{self.product_name} ({float(self.content_litres):.2f}l) - {self.price}{settings.CURRENCY_SUFFIX}"
|
||||
def __str__(self):
|
||||
return f"{self.product_name} ({float(self.content_litres):.2f}l) - {self.price}{settings.CURRENCY_SUFFIX}"
|
||||
|
||||
|
||||
class RegisterTransaction(models.Model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue