What is Appliku?

Icon
Simplest way to deploy Python/Django apps

Push code to Git repo, Appliku will build & deploy the app to your cloud servers.

Learn more .

Start Deploying
Icon
SpeedPy.com
Django SaaS Project Template

Start building your app right from what makes your app unique

Get SpeedPy.Com
Icon
Appliku SaaS Discord Community

The place where you can talk to like minded individuals who are at different stages of building their SaaS or other apps.

Join Community

Bulk Create model instances in Django

Share post:

If you have a lot of objects to save in database you may want to create them using .bulk_create method to make it faster.


Post.objects.bulk_create([
    Post(title="Tutorial 1"),
    Post(title="Tutorial 2"),
])

Details and caveats:

  • Generally runs only 1 query for the whole list of objects, thus works faster than individual inserts
  • .save() method will not be called
  • This will ignore pre and post save signals.
Share post:
Top