Changeset 9819 for src/django_gheat/gheat/management
- Timestamp:
- Dec 23, 2011, 8:31:50 AM (13 years ago)
- Location:
- src/django_gheat/gheat/management/commands
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/management/commands/add_random_points.py
r9057 r9819 19 19 equipment, created = Apparatuur.objects.get_or_create(antenne='itern', kaart='device') 20 20 21 acces point, created = Accespoint.objects.get_or_create(mac='00:11:22:33:44',21 accesspoint, created = Accesspoint.objects.get_or_create(mac='00:11:22:33:44', 22 22 ssid='ap-WirelessLeiden-Test', encryptie=True) 23 23 … … 27 27 rondje.save() 28 28 29 sql_insert = "INSERT INTO gheat_meting (meetrondje_id, acces point_id, lat, lng, signaal) VALUES ";29 sql_insert = "INSERT INTO gheat_meting (meetrondje_id, accesspoint_id, lat, lng, signaal) VALUES "; 30 30 sql_insert_values = [] 31 31 for i in range(0,count): … … 38 38 # print "#Importing Random mesurements: %s/%s" % (i,count) 39 39 #meting = Meting.objects.create(meetrondje=rondje, 40 # acces point=accespoint,latitude=latitude,40 # accesspoint=accesspoint,latitude=latitude, 41 41 # longitude=longitude,signaal=signal) 42 42 #meting.save() 43 sql_insert_values.append("('" + "','".join(map(str,[rondje.id, acces point.id, latitude, longitude, signal])) + "')")43 sql_insert_values.append("('" + "','".join(map(str,[rondje.id, accesspoint.id, latitude, longitude, signal])) + "')") 44 44 45 45 sql_insert += ','.join(sql_insert_values) + ';'; -
src/django_gheat/gheat/management/commands/import_datafile.py
r9669 r9819 139 139 140 140 counters = import_file(filename,meetrondje) 141 logger.info("summary acces points: total:%(ap_total)-6s added:%(ap_added)-6s failed:%(ap_failed)-6s ignored:%(ap_ignored)-6s" % counters)141 logger.info("summary accesspoints: total:%(ap_total)-6s added:%(ap_added)-6s failed:%(ap_failed)-6s ignored:%(ap_ignored)-6s" % counters) 142 142 logger.info("summary client : total:%(client_total)-6s added:%(client_added)-6s failed:%(client_failed)-6s ignored:%(client_ignored)-6s" % counters) 143 143 logger.info("summary metingen : total:%(meting_total)-6s added:%(meting_added)-6s failed:%(meting_failed)-6s ignored:%(meting_ignored)-6s" % counters)
Note:
See TracChangeset
for help on using the changeset viewer.