Add another
This commit is contained in:
9
products/models.py
Normal file
9
products/models.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from django.db import models
|
||||
|
||||
class Product(models.Model):
|
||||
name = models.CharField(max_length=255, verbose_name="Название")
|
||||
price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name="Цена")
|
||||
weight = models.FloatField(verbose_name="Вес (кг)")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
Reference in New Issue
Block a user