Django create query set

Last updated 3 months ago | 154 views 75     5

Tags:- Django

Django | Insert record in database using create() function



Create function create a new object with the given `kwargs`, saving it to the database and returning the created object. It creates an object and saving it, all in one step.

Person.objects.create(first_name="David", last_name="Brown")