from turbogears import paginate
from docutils.core import publish_parts
from sercom.subcontrollers import validate as val
-from sercom.model import Alumno
+from sercom.model import Alumno, Rol
from sqlobject import *
#}}}
lines = archivo.file.read().split('\n')
ok = []
fail = []
+ entregador = Rol.get(2)
for line in lines:
for row in csv.reader([line]):
if row == []:
u = Alumno(row[0], nombre=row[1])
u.email = row[2]
u.telefono = row[3]
- u.contrasenia = row[0]
+ u.password = row[0]
u.activo = True
+ u.add_rol(entregador)
ok.append(row)
except Exception, e:
row.append(str(e))