多表操作(一对多)增加记录:
1)Bookl.objects.creat(name='python', price=77, publish_id=2)
2) pulish_obj = Publish.objects.filter(name='人民出版社')[0]
Bookl.objects.creat(name='python', price=77, publish=pulish_obj)
多表操作(一对多)增加记录:
1)Bookl.objects.creat(name='python', price=77, publish_id=2)
2) pulish_obj = Publish.objects.filter(name='人民出版社')[0]
Bookl.objects.creat(name='python', price=77, publish=pulish_obj)