insert data into database outside of views in django code example
Example: insert data in django models
from books.models import Publisher
p = Publisher(name='Apress', city='Berkeley')
p.save()
from books.models import Publisher
p = Publisher(name='Apress', city='Berkeley')
p.save()