diff --git a/.gitignore b/.gitignore index 3dc9a18c..efee2015 100644 --- a/.gitignore +++ b/.gitignore @@ -6,10 +6,11 @@ __pycache__ **/*__pycache__ db.sqlite3 media -./car_inventory/settings.py +./car_inventory/settings* # Backup files # *.bak + # If you are using PyCharm # # User-specific stuff .idea/**/workspace.xml diff --git a/car_inventory/settings.py b/car_inventory/settings.py index e931dbae..13064782 100644 --- a/car_inventory/settings.py +++ b/car_inventory/settings.py @@ -104,24 +104,24 @@ WSGI_APPLICATION = 'car_inventory.wsgi.application' # Database # https://docs.djangoproject.com/en/5.0/ref/settings/#databases -DATABASES = { - "default": { - "ENGINE": "django_prometheus.db.backends.postgresql", - "NAME": "murad_haikal", - "USER": "f95166", - "PASSWORD": "Kfsh&rc9788", - "HOST": "localhost", - "PORT": 5432, - } -} - # DATABASES = { -# 'default': { -# 'ENGINE': 'django.db.backends.sqlite3', -# 'NAME': 'db.sqlite3', +# "default": { +# "ENGINE": "django_prometheus.db.backends.postgresql", +# "NAME": "murad_haikal", +# "USER": "f95166", +# "PASSWORD": "Kfsh&rc9788", +# "HOST": "localhost", +# "PORT": 5432, # } # } +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': 'db.sqlite3', + } +} + # Password validation # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators diff --git a/inventory/models.py b/inventory/models.py index 0a7468e3..9009ca6c 100644 --- a/inventory/models.py +++ b/inventory/models.py @@ -29,6 +29,16 @@ from django.db.models import FloatField from .mixins import LocalizedNameMixin from django_ledger.models import EntityModel +UNIT_CHOICES = ( + ("Kg", _("Kg")), + ("L", _("L")), + ("m", _("m")), + ("cm", _("cm")), + ("m2", _("m2")), + ("m3", _("m3")), + ("m3", _("m3")), +) + class CarMake(models.Model, LocalizedNameMixin): id_car_make = models.AutoField(primary_key=True) name = models.CharField(max_length=255)