def get_locations(self):
    db = sqlite3.connect(self.db_name)
    c = db.cursor()
    c.execute('SELECT loc FROM data GROUP BY loc')
    locs = c.fetchall()
    db.close()
    locations = []
    for l in locs:
        locations.append(l[0])
    return locations
def get_locations(self):
    db = sqlite3.connect(self.db_name)
    c = db.cursor()
    c.execute('SELECT loc FROM data GROUP BY loc')
    locs = c.fetchall()
    db.close()
    locations = []
    for l in locs:
        locations.append(l[0])
    return locations