Commit ee9225a0 authored by HEVELINE Thomas's avatar HEVELINE Thomas Committed by HEVELINE Thomas
Browse files

(44): reset settings

parent e6de7612
......@@ -72,9 +72,9 @@ class Item(models.Model):
@property
def customizable(self) -> bool:
return (
(self.customization is True)
or (self.option != "")
or (self.second_option != "")
(self.customization is True)
or (self.option != "")
or (self.second_option != "")
)
@property
......@@ -322,10 +322,10 @@ class OrderItemManager(models.Manager):
def get_ordered_quantity(self, item: "Item", user) -> int:
"""Get the total quantity ever ordered/in order by that user"""
return (
self.filter(item=item, order__user=user, order__rejected=False).aggregate(
quantity=Sum("quantity")
)["quantity"]
or 0
self.filter(item=item, order__user=user, order__rejected=False).aggregate(
quantity=Sum("quantity")
)["quantity"]
or 0
)
......
......@@ -26,9 +26,9 @@ SECRET_KEY = "&d3ykoj75pkdv_q^4%ens@047+qi^_^379rg#!o%zg1j=pmwi&"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
INTERNAL_IPS = []
INTERNAL_IPS = ["127.0.0.1"]
ALLOWED_HOSTS: List[str] = ['127.0.0.1']
ALLOWED_HOSTS: List[str] = []
# Application definition
......@@ -101,8 +101,8 @@ DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "sde",
"USER": "fenwick",
"PASSWORD": "fenwick",
"USER": "root",
"PASSWORD": "",
"HOST": "127.0.0.1",
"PORT": 3306,
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment