From: Leandro Lucarella Date: Fri, 16 Feb 2007 00:15:09 +0000 (+0000) Subject: Cambiar forma de obtener listados parciales. X-Git-Tag: pre-merge~141 X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/commitdiff_plain/04677c432f0c579e2ef79e80c1c14d7f1d33369a?ds=sidebyside;hp=b095cc64b996bdb63bbddd051887a6180770c684 Cambiar forma de obtener listados parciales. --- diff --git a/sercom/subcontrollers/caso_de_prueba/__init__.py b/sercom/subcontrollers/caso_de_prueba/__init__.py index f91397d..9b50925 100644 --- a/sercom/subcontrollers/caso_de_prueba/__init__.py +++ b/sercom/subcontrollers/caso_de_prueba/__init__.py @@ -74,14 +74,14 @@ class CasoDePruebaController(controllers.Controller, identity.SecureResource): raise redirect('list') @expose(template='kid:%s.templates.list' % __name__) - @validate(validators=dict(enunciadoID=validators.Int)) + @validate(validators=dict(enunciado=validators.Int)) @paginate('records') - def list(self, enunciadoID=None, tg_flash=None): + def list(self, enunciado=None, tg_flash=None): """List records in model""" - if enunciadoID is None: + if enunciado is None: r = cls.select() else: - r = cls.selectBy(enunciadoID=enunciadoID) + r = cls.selectBy(enunciadoID=enunciado) return dict(records=r, name=name, namepl=namepl, tg_flash=tg_flash) @expose(template='kid:%s.templates.new' % __name__) diff --git a/sercom/subcontrollers/docente/templates/list.kid b/sercom/subcontrollers/docente/templates/list.kid index 0bcec6b..2ec9e22 100644 --- a/sercom/subcontrollers/docente/templates/list.kid +++ b/sercom/subcontrollers/docente/templates/list.kid @@ -32,7 +32,7 @@ telefono nombrado observaciones - cant Editar Eliminar diff --git a/sercom/subcontrollers/enunciado/__init__.py b/sercom/subcontrollers/enunciado/__init__.py index 55df337..f8b045c 100644 --- a/sercom/subcontrollers/enunciado/__init__.py +++ b/sercom/subcontrollers/enunciado/__init__.py @@ -69,14 +69,14 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): raise redirect('list') @expose(template='kid:%s.templates.list' % __name__) - @validate(validators=dict(autorID=validators.Int)) + @validate(validators=dict(autor=validators.Int)) @paginate('records') - def list(self, autorID=None, tg_flash=None): + def list(self, autor=None, tg_flash=None): """List records in model""" - if autorID is None: + if autor is None: r = cls.select() else: - r = cls.selectBy(autorID=autorID) + r = cls.selectBy(autorID=autor) return dict(records=r, name=name, namepl=namepl, tg_flash=tg_flash) @expose(template='kid:%s.templates.new' % __name__) diff --git a/sercom/subcontrollers/enunciado/templates/list.kid b/sercom/subcontrollers/enunciado/templates/list.kid index 35dedf7..8558dba 100644 --- a/sercom/subcontrollers/enunciado/templates/list.kid +++ b/sercom/subcontrollers/enunciado/templates/list.kid @@ -24,7 +24,7 @@ href="${tg.url('/docente/show/%d' % record.autor.id)}">autor cant Editar Eliminar