0
我正在为网上商店制作购物车。我有一个像什么是产品属性的好模型
#Product
from django.db import models
class Product(models.Model):
title = models.CharField()
attribute = models.ManyToManyField('Attribute')
我怎样才能让属性模型,如大小,颜色与它们的键,如数字或选择一个型号产品(“红”,“绿”,......)?