from django.db import transaction @transaction.commit_manually def viewfunc(request): ... for item in items: entry = Entry(a1=item.a1, a2=item.a2) entry.save() transaction.commit()