def parsecsv(self):
    csvread = io.StringIO(self.file.decode('utf8'))
    reader = csv.reader(utf_8_encoder(csvread), delimiter=',', quotechar="'")
    parsedlist = list()
    for row in reader:
        tsmodel = self.taskclass(User.getUser(self.submitterid).name, self.id)
        for (column, data) in zip(filter((lambda x: (x.name[:3] == u'sch')), inspect(self.taskclass).columns), row):
            if (type(column.type) == INTEGER):
                try:
                    setattr(tsmodel, column.name, int(data))
                except:
                    setattr(tsmodel, column.name, None)
            elif (type(column.type) == DATETIME):
                try:
                    setattr(tsmodel, column.name, datetime.strptime(data, '%Y-%m-%d %H:%M'))
                except:
                    setattr(tsmodel, column.name, None)
            else:
                setattr(tsmodel, column.name, data)
        parsedlist.append(tsmodel)
    return parsedlist
def parsecsv(self):
    csvread = io.StringIO(self.file.decode('utf8'))
    reader = csv.reader(utf_8_encoder(csvread), delimiter=',', quotechar="'")
    parsedlist = list()
    for row in reader:
        tsmodel = self.taskclass(User.getUser(self.submitterid).name, self.id)
        for (column, data) in zip(filter((lambda x: (x.name[:3] == u'sch')), inspect(self.taskclass).columns), row):
            if (type(column.type) == INTEGER):
                try:
                    setattr(tsmodel, column.name, int(data))
                except:
                    setattr(tsmodel, column.name, None)
            elif (type(column.type) == DATETIME):
                try:
                    setattr(tsmodel, column.name, datetime.strptime(data, '%Y-%m-%d %H:%M'))
                except:
                    setattr(tsmodel, column.name, None)
            else:
                setattr(tsmodel, column.name, data)
        parsedlist.append(tsmodel)
    return parsedlist