From 08f2c570c52d374281cf09825902e321115ba4f8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 12 Feb 2007 04:15:47 +0000 Subject: [PATCH 1/1] Listar enunciados de los docentes. --- sercom/subcontrollers/docente/templates/list.kid | 3 +++ sercom/subcontrollers/enunciado/__init__.py | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sercom/subcontrollers/docente/templates/list.kid b/sercom/subcontrollers/docente/templates/list.kid index 5d696df..2ffe51c 100644 --- a/sercom/subcontrollers/docente/templates/list.kid +++ b/sercom/subcontrollers/docente/templates/list.kid @@ -18,6 +18,7 @@ Teléfono Nombrado Observaciones + Enunciados Operaciones @@ -31,6 +32,8 @@ telefono nombrado observaciones + cant Editar Eliminar diff --git a/sercom/subcontrollers/enunciado/__init__.py b/sercom/subcontrollers/enunciado/__init__.py index d2897a5..55df337 100644 --- a/sercom/subcontrollers/enunciado/__init__.py +++ b/sercom/subcontrollers/enunciado/__init__.py @@ -71,11 +71,13 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): @expose(template='kid:%s.templates.list' % __name__) @validate(validators=dict(autorID=validators.Int)) @paginate('records') - def list(self, **kw): + def list(self, autorID=None, tg_flash=None): """List records in model""" - f = kw.get('tg_flash', None) - r = cls.select() - return dict(records=r, name=name, namepl=namepl, tg_flash=f) + if autorID is None: + r = cls.select() + else: + r = cls.selectBy(autorID=autorID) + return dict(records=r, name=name, namepl=namepl, tg_flash=tg_flash) @expose(template='kid:%s.templates.new' % __name__) def new(self, **kw): -- 2.43.0