from turbogears import paginate
from docutils.core import publish_parts
from sercom.subcontrollers import validate as val
-from sercom.model import Curso, Correccion, Ejercicio, Alumno, Docente, Grupo, DocenteInscripto
+from sercom.model import Curso, Correccion, Ejercicio, Alumno, Docente, Grupo, DocenteInscripto, Rol
from curso_alumno import *
from sqlobject import *
from sqlobject.dberrors import *
if row == []:
continue
try:
- u = Alumno(row[0], nombre=row[1])
+ u = Alumno(row[0], nombre=row[1], roles=[Rol.by_nombre('alumno')])
except:
u = Alumno.byPadron(row[0])
try:
u.email = row[2]
u.telefono = row[3]
- u.contrasenia = row[0]
+ u.password = row[0]
u.activo = True
curso.add_alumno(u)
ok.append(row)