Exemplo 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()
Exemplo 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()
Exemplo n.º 3
0
def stories_in_database(step):
    bulk_create(step.hashes)
Exemplo n.º 4
0
def stories_in_database(step):
    bulk_create(step.hashes)