django add item to database code example
Example 1: insert data in django models
from books.models import Publisher
p = Publisher(name='Apress', city='Berkeley')
p.save()
Example 2: django get item by id
obj = Class.objects.get(pk=this_object_id)