This will INSERT a new row into the database. The primary key will automatically be retrieved and stored on the model instance.

    Alternatively, you can build up a model instance programmatically and then call :

    You can also use the value of the related object’s primary key:

    If you simply wish to insert data and do not need to create a model instance, you can use :

    Note

    There are several ways you can speed up bulk insert operations. Check out the recipe section for more information.