X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/5cd1df8c26d5462fed3d660d965d5e2e34af8119..d866624024289a9e2b6c9c1edd3297b511a346b3:/sercom/subcontrollers/docente/__init__.py diff --git a/sercom/subcontrollers/docente/__init__.py b/sercom/subcontrollers/docente/__init__.py index c410e4d..e407081 100644 --- a/sercom/subcontrollers/docente/__init__.py +++ b/sercom/subcontrollers/docente/__init__.py @@ -60,6 +60,13 @@ class DocenteController(controllers.Controller, identity.SecureResource): return dict(records=r, name=name, namepl=namepl, tg_flash=f) + @expose() + def activate(self, id, activo): + """Save or create record to model""" + cls.get(int(id)).activo = int(activo) + + raise redirect('../list') + @expose(template='kid:sercom.subcontrollers.%s.templates.new' % name) def new(self, **kw): """Create new records in model"""