]> git.llucax.com Git - software/sercom.git/blobdiff - sercom/subcontrollers/enunciado/__init__.py
Poner foco en formularios.
[software/sercom.git] / sercom / subcontrollers / enunciado / __init__.py
index d2897a5c10ea38d39e9aa72c1dbeecfe113dc6bd..55df337ee1c9f1aa925829262eefe870a4269a8f 100644 (file)
@@ -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):