Esempio n. 1
0
    def handle(self, *args, **options):
        try:
            csv_file = open(args[0])
        except IndexError:
            raise CommandError("You must provide a CSV file argument")

        reader = csv.DictReader(csv_file)
        bulk_create(reader)

        csv_file.close()
Esempio n. 2
0
    def handle(self, *args, **options):
        try:
            csv_file = open(args[0])
        except IndexError:
            raise CommandError("You must provide a CSV file argument")

        reader = csv.DictReader(csv_file)
        bulk_create(reader)

        csv_file.close()
Esempio n. 3
0
def stories_in_database(step):
    bulk_create(step.hashes)
Esempio n. 4
0
def stories_in_database(step):
    bulk_create(step.hashes)