How to get the ID of a just created record in Django? June 27, 2023 by Tarik Use n.id after the save. See “Auto-incrementing primary keys”.