purchase table misspelled

This commit is contained in:
Bossanyi Tibor 2020-11-06 07:42:30 +01:00
parent 29f84abb88
commit 65e358d0c1
2 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ class ProductAdmin(admin.ModelAdmin):
class PurchaseAdmin(admin.ModelAdmin):
list_display = ('id', 'product', 'customer_id', 'purchase_sum', 'currency', 'date_add')
list_display = ('purchase_id', 'product', 'customer_id', 'purchase_sum', 'currency', 'date_add')
list_filter = ['product']

View File

@ -175,7 +175,7 @@ class Product(models.Model):
class Purchase(models.Model):
id = models.AutoField(primary_key=True)
purchase_id = models.AutoField(primary_key=True)
product = models.ForeignKey(Product, on_delete=models.CASCADE)
customer_id = models.IntegerField()
date_add = models.DateField(blank=True, null=True)
@ -183,6 +183,6 @@ class Purchase(models.Model):
currency = models.CharField(max_length=3)
class Meta:
db_table = 'Purchase'
db_table = 'purchase'
verbose_name = _("Purchase")
verbose_name_plural = _("Purchases")