From 6526a74b42e33e807f8e3846f38b28ef1f5de534 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 10 Feb 2007 19:55:55 +0000 Subject: [PATCH 1/1] =?utf8?q?Mejorar=20especificaci=C3=B3n=20"din=C3=A1mi?= =?utf8?q?ca"=20de=20templates.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sercom/subcontrollers/docente/__init__.py | 8 ++++---- sercom/subcontrollers/enunciado/__init__.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sercom/subcontrollers/docente/__init__.py b/sercom/subcontrollers/docente/__init__.py index c93184d..a167d7a 100644 --- a/sercom/subcontrollers/docente/__init__.py +++ b/sercom/subcontrollers/docente/__init__.py @@ -56,7 +56,7 @@ class DocenteController(controllers.Controller, identity.SecureResource): def index(self): raise redirect('list') - @expose(template='kid:sercom.subcontrollers.%s.templates.list' % name) + @expose(template='kid:%s.templates.list' % __name__) @paginate('records') def list(self, **kw): """List records in model""" @@ -74,7 +74,7 @@ class DocenteController(controllers.Controller, identity.SecureResource): raise redirect('../list', tg_flash=_(u'Acción inválida.')) raise redirect('../list') - @expose(template='kid:sercom.subcontrollers.%s.templates.new' % name) + @expose(template='kid:%s.templates.new' % __name__) def new(self, **kw): """Create new records in model""" f = kw.get('tg_flash', None) @@ -88,7 +88,7 @@ class DocenteController(controllers.Controller, identity.SecureResource): validate_new(kw) raise redirect('list', tg_flash=_(u'Se creó un nuevo %s.') % name) - @expose(template='kid:sercom.subcontrollers.%s.templates.edit' % name) + @expose(template='kid:%s.templates.edit' % __name__) def edit(self, id, **kw): """Edit record in model""" r = validate_get(id) @@ -104,7 +104,7 @@ class DocenteController(controllers.Controller, identity.SecureResource): raise redirect('../list', tg_flash=_(u'El %s fue actualizado.') % name) - @expose(template='kid:sercom.subcontrollers.%s.templates.show' % name) + @expose(template='kid:%s.templates.show' % __name__) def show(self,id, **kw): """Show record in model""" r = validate_get(id) diff --git a/sercom/subcontrollers/enunciado/__init__.py b/sercom/subcontrollers/enunciado/__init__.py index 569b2ac..2ac3435 100644 --- a/sercom/subcontrollers/enunciado/__init__.py +++ b/sercom/subcontrollers/enunciado/__init__.py @@ -63,7 +63,7 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): def index(self): raise redirect('list') - @expose(template='kid:sercom.subcontrollers.%s.templates.list' % name) + @expose(template='kid:%s.templates.list' % __name__) @paginate('records') def list(self, **kw): """List records in model""" @@ -71,7 +71,7 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): r = cls.select() return dict(records=r, name=name, namepl=namepl, tg_flash=f) - @expose(template='kid:sercom.subcontrollers.%s.templates.new' % name) + @expose(template='kid:%s.templates.new' % __name__) def new(self, **kw): """Create new records in model""" f = kw.get('tg_flash', None) @@ -85,7 +85,7 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): validate_new(kw) raise redirect('list', tg_flash=_(u'Se creó un nuevo %s.') % name) - @expose(template='kid:sercom.subcontrollers.%s.templates.edit' % name) + @expose(template='kid:%s.templates.edit' % __name__) def edit(self, id, **kw): """Edit record in model""" r = validate_get(id) @@ -101,7 +101,7 @@ class EnunciadoController(controllers.Controller, identity.SecureResource): raise redirect('../list', tg_flash=_(u'El %s fue actualizado.') % name) - @expose(template='kid:sercom.subcontrollers.%s.templates.show' % name) + @expose(template='kid:%s.templates.show' % __name__) def show(self,id, **kw): """Show record in model""" r = validate_get(id) -- 2.43.0