django createmany

Solutions on MaxInterview for django createmany by the best coders in the world

showing results for - "django createmany"
Andrés
10 Jul 2016
1>>> Category.objects.all().count()
22
3>>> Category.objects.bulk_create(
4    [Category(name="God"),
5     Category(name="Demi God"),
6     Category(name="Mortal")]
7)
8[<Category: God>, <Category: Demi God>, <Category: Mortal>]
9>>> Category.objects.all().count()
105
11