money uses decimalfield
This commit is contained in:
parent
dfa82bfccd
commit
22c45d24af
2 changed files with 1 additions and 7 deletions
|
@ -2,7 +2,6 @@ from uuid import uuid4
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from djmoney.models.fields import MoneyField
|
|
||||||
|
|
||||||
from aviary.models import Aviary
|
from aviary.models import Aviary
|
||||||
from rescuer.models import Rescuer
|
from rescuer.models import Rescuer
|
||||||
|
@ -24,8 +23,7 @@ class FallenBird(models.Model):
|
||||||
created = models.DateTimeField(auto_now_add=True)
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
updated = models.DateTimeField(auto_now=True)
|
updated = models.DateTimeField(auto_now=True)
|
||||||
diagnostic_finding = models.CharField(max_length=256)
|
diagnostic_finding = models.CharField(max_length=256)
|
||||||
cost_sum = MoneyField(
|
cost_sum = models.DecimalField(max_digits=4, decimal_places=2)
|
||||||
max_digits=4, decimal_places=2, default_currency='EUR')
|
|
||||||
rescuer = models.ForeignKey(
|
rescuer = models.ForeignKey(
|
||||||
Rescuer, on_delete=models.SET_NULL, blank=True, null=True)
|
Rescuer, on_delete=models.SET_NULL, blank=True, null=True)
|
||||||
user = models.ForeignKey(
|
user = models.ForeignKey(
|
||||||
|
|
|
@ -51,10 +51,6 @@ INSTALLED_APPS = [
|
||||||
"crispy_bootstrap5",
|
"crispy_bootstrap5",
|
||||||
"crispy_forms",
|
"crispy_forms",
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Django-Money
|
|
||||||
# -----------------------------------
|
|
||||||
"djmoney",
|
|
||||||
# -----------------------------------
|
|
||||||
# My Apps
|
# My Apps
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
"aviary",
|
"aviary",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue