django createmany

# Import necessary modules
from django.db import models

# Define the model
class YourModel(models.Model):
    # Define your model fields
    field1 = models.CharField(max_length=100)
    field2 = models.IntegerField()

# Prepare a list of dictionaries with data to be inserted
data_list = [
    {'field1': 'value1', 'field2': 123},
    {'field1': 'value2', 'field2': 456},
    # Add more dictionaries as needed

# Use the create method to insert multiple records into the database
    YourModel(data) for data in data_list