validator=validators.Bool(if_empty=1)),
])
-def minimize(text, size=15):
- if text is not None and len(text) > size:
- text = text[:size] + '...'
- return text
-
class DocenteController(controllers.Controller, identity.SecureResource):
"""Basic model admin interface"""
require = identity.has_permission('admin')
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"""