#How to import many rows of data into django models.
2 messages · Page 1 of 1 (latest)
Hello! You can programmatically create Django models using YourModel.objects.create() or its bulk_create() counterpart.
If you already have a list of IDs and Names, you might create a script that reads your original data and creates the objects.
Take note that bulk_create() behaves somewhat differently from regular creation.
https://docs.djangoproject.com/en/5.0/ref/models/querysets/#bulk-create
I recommend reading the documentation on Django Models as well.