Ejemplo n.º 1
0
 def handle(self, *args, **kwargs):
     for sector, facilities in Facility.export_geocoords().iteritems():
         with open(os.path.join('export', '%s.csv' % sector), 'wb') as _file:
             writer = csv.writer(_file)
             for facility in facilities:
                 writer.writerow([facility['id'], facility['lat'], facility['long']])