Skip to content

Instantly share code, notes, and snippets.

View stefanbackor's full-sized avatar

Štefan Bačkor stefanbackor

View GitHub Profile
# Originally from marc-w.com
# Built and tested on Django 1.6
# NOTE: this is not bulletproof for sql injection, but works with INSERT .. SELECT FROM queries.
# thats why you should wrap strings into "" on your own.
from django.db import connection, transaction
class BulkInsertManager(models.Manager):