Fix python errors on latest hack commits => make runserver happy again

This commit is contained in:
fnux 2020-02-27 11:59:28 +01:00
commit 06ab21c577
13 changed files with 121 additions and 107 deletions

View file

@ -1,8 +1,11 @@
from django.db import models
from django.contrib.auth import get_user_model
from django.core.validators import MinValueValidator
# Create your models here.
import uuid
AMOUNT_MAX_DIGITS=10
AMOUNT_DECIMALS=2
class Bill(models.Model):
owner = models.ForeignKey(get_user_model(),
@ -35,7 +38,6 @@ class Order(models.Model):
null=True)
bill = models.ManyToManyField(Bill,
on_delete=models.CASCADE,
editable=False,
blank=True,
null=True)
@ -77,6 +79,8 @@ class Payment(models.Model):
amount = models.DecimalField(
default=0.0,
max_digits=AMOUNT_MAX_DIGITS,
decimal_places=AMOUNT_DECIMALS,
validators=[MinValueValidator(0)])
source = models.CharField(max_length=256,