summaryrefslogtreecommitdiff
path: root/ishtar_common/management/commands
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2013-04-30 11:01:38 +0000
committerÉtienne Loks <etienne.loks@proxience.com>2013-04-30 11:01:38 +0000
commit94dfdaf3303f648de5ed228809d042f7329dc09e (patch)
tree6c6a67f3325c1ffb03ae3e5078c93f1fa04343ae /ishtar_common/management/commands
parent670e4c633a4fc0d66d10ac6e88b27ff6fb494328 (diff)
parentdcae60f13e35d2b0298d8e184e32c0c6353bb520 (diff)
downloadIshtar-94dfdaf3303f648de5ed228809d042f7329dc09e.tar.bz2
Ishtar-94dfdaf3303f648de5ed228809d042f7329dc09e.zip
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'ishtar_common/management/commands')
-rw-r--r--ishtar_common/management/commands/load_towns.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/ishtar_common/management/commands/load_towns.py b/ishtar_common/management/commands/load_towns.py
new file mode 100644
index 000000000..00a1b8477
--- /dev/null
+++ b/ishtar_common/management/commands/load_towns.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import csv
+import datetime, time
+
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+
+from ishtar_common import tasks
+
+class Command(BaseCommand):
+ help = "Load french towns"
+
+ def handle(self, *args, **options):
+ self.stdout.write("* Loading towns\n")
+ self.stdout.flush()
+ created, updated = tasks.load_towns()
+ self.stdout.write("%d towns created, %s towns updated\n\n" % (created,
+ updated))
+ self.stdout.flush()
+