purchase table misspelled
This commit is contained in:
parent
29f84abb88
commit
65e358d0c1
@ -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']
|
||||
|
||||
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user