- return dict(records=r, name=name, namepl=namepl, tg_flash=f)
+ @expose()
+ def activate(self, id, activo):
+ """Save or create record to model"""
+ r = validate_get(id)
+ try:
+ r.activo = bool(int(activo))
+ except ValueError:
+ raise cherrypy.NotFound
+ raise redirect('../../list')