def create_shipping_methods():
shipping_method = ShippingMethod.objects.create(name='UPC')
shipping_method.price_per_country.create(price=fake.price())
yield 'Shipping method #%d' % shipping_method.id
shipping_method = ShippingMethod.objects.create(name='DHL')
shipping_method.price_per_country.create(price=fake.price())
yield 'Shipping method #%d' % shipping_method.id
评论列表
文章目录