Bulk create model objects in django
as of the django development, there exists bulk_create
as an object manager method which takes as input an array of objects created using the class constructor. check out django docs
Use bulk_create()
method. It's standard in Django now.
Example:
Entry.objects.bulk_create([
Entry(headline="Django 1.0 Released"),
Entry(headline="Django 1.1 Announced"),
Entry(headline="Breaking: Django is awesome")
])