I\'m using Django 1.3 for one of my projects and I need to get the ID of a record just saved in the database.
I have something like the code below to save a record i
The ID will be automatically updated in your model, so immediately after your n.save() line you can read n.id and it will be populated.
n.save()
n.id