Guest User

Untitled

a guest
Jan 7th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. class Category(models.Model):
  2.     name = models.CharField('Группа товара', max_length=64)
  3.  
  4.  
  5. class Product(models.Model):
  6.     category = models.ForeignKey(Category, verbose_name='Группа')
  7.     name = models.CharField('Название товара', max_length=128)
  8.     price = models.DecimalField('Стоимость единицы, руб.', max_digits=10, decimal_places=2)
Advertisement
Add Comment
Please, Sign In to add comment