First method:
1. instantiating
p1=Card(name=’Hot Pot’, city=’San Diego’)
2. saving
p1.save()
Note here before calling save() method, it is not saved in the DB.
Django executes an SQL INSERT statement when save() is called.
Second method:
p1=Card.objects.create(name=’Hot Pot’, city=’San Diego’)
Use
objects.craete() method
