RES: [zope-pt] Página de apresentação (dat a de publicação)
Oi Lucas Está dando um erro, já tentei colocar esse código de várias formas, mas não funciona. O erro é o seguinte: Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 891, in do_useMacro Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 536, in do_optTag_tal Module zope.tal.talinterpreter, line 521, in do_optTag Module zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 949, in do_defineSlot Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 891, in do_useMacro Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 824, in do_loop_tal Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 536, in do_optTag_tal Module zope.tal.talinterpreter, line 521, in do_optTag Module zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 623, in do_insertText_tal Module Products.PageTemplates.Expressions, line 228, in evaluateText Module zope.tales.tales, line 696, in evaluate - URL: portlet_destaques - Line 39, Column 13 - Expression: PythonExpr obj.effective.strftime('%d-%m-%Y') - Names: {'container': PloneSite at / Plone , 'context': PloneSite at / Plone , 'default': object object at 0x0072A528, 'here': PloneSite at /Plone, 'loop': {u'obj': Products.PageTemplates.Expressions.PathIterator object at 0x1232B3D0}, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.Expressions.SafeMapping object at 0x121A39B8, 'request': HTTPRequest, URL=http://localhost:8080/index_html, 'root': Application at , 'template': ZopePageTemplate at /index_html, 'traverse_subpath': [], 'user': PropertiedUser 'admin'} Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: obj.effective.strftime('%d-%m-%Y') Module PythonExpr, line 1, in expression Module DateTime.DateTime, line 1494, in strftime ValueError: year=1000 is before 1900; the datetime strftime() methods require year = 1900
Re: [zope-pt] Página de apresentação (data de pub licação)
Carmelita, Esse erro ocorre quando vc não tem noticias publicadas, ou foi publicado antes do ano 1900. O effective não é um index obrigatório. Geralmente utiliza-se a data de modificação do conteúdo, *modified*. Mas tenta publicar as notícias, ou troca no template, o effective pelo modified. Que funciona :) Att, 2009/1/29 Carmelita Cristina Tolentino crist...@arquivar.com.br Oi Lucas Está dando um erro, já tentei colocar esse código de várias formas, mas não funciona. O erro é o seguinte: Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 891, in do_useMacro Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 536, in do_optTag_tal Module zope.tal.talinterpreter, line 521, in do_optTag Module zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 949, in do_defineSlot Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 891, in do_useMacro Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 824, in do_loop_tal Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 536, in do_optTag_tal Module zope.tal.talinterpreter, line 521, in do_optTag Module zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 623, in do_insertText_tal Module Products.PageTemplates.Expressions, line 228, in evaluateText Module zope.tales.tales, line 696, in evaluate - URL: portlet_destaques - Line 39, Column 13 - Expression: PythonExpr obj.effective.strftime('%d-%m-%Y') - Names: {'container': PloneSite at / Plone , 'context': PloneSite at / Plone , 'default': object object at 0x0072A528, 'here': PloneSite at /Plone, 'loop': {u'obj': Products.PageTemplates.Expressions.PathIterator object at 0x1232B3D0}, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.Expressions.SafeMapping object at 0x121A39B8, 'request': HTTPRequest, URL=http://localhost:8080/index_html, 'root': Application at , 'template': ZopePageTemplate at /index_html, 'traverse_subpath': [], 'user': PropertiedUser 'admin'} Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: obj.effective.strftime('%d-%m-%Y') Module PythonExpr, line 1, in expression Module DateTime.DateTime, line 1494, in strftime ValueError: year=1000 is before 1900; the datetime strftime() methods require year = 1900 -- Lucas Aquino Liberiun lucasaqu...@liberiun.com http://www.liberiun.com +55 61 3468-2662
RES: [zope-pt] Página de apresentação (dat a de publicação)
Luca, obrigada pela ajuda. Deu certo da forma que você falou. O código ficou assim: span class=portletItemDetails tal:content=python:obj.modified.strftime('%d/%m/%Y') 06/06/2006 /span Porém antes de você me responder, encontrei outra forma: span tal:replace=python:toLocalizedTime(obj.Date, long_format=1) / Que também deu certo. :-) Vlw pela ajuda!!! De: zope-pt@yahoogrupos.com.br [mailto:zope...@yahoogrupos.com.br] Em nome de Lucas Aquino Enviada em: quinta-feira, 29 de janeiro de 2009 12:46 Para: zope-pt@yahoogrupos.com.br Assunto: Re: [zope-pt] Página de apresentação (data de publicação) Carmelita, Esse erro ocorre quando vc não tem noticias publicadas, ou foi publicado antes do ano 1900. O effective não é um index obrigatório. Geralmente utiliza-se a data de modificação do conteúdo, modified. Mas tenta publicar as notícias, ou troca no template, o effective pelo modified. Que funciona :) Att, 2009/1/29 Carmelita Cristina Tolentino crist...@arquivar.com.br mailto:crist...@arquivar.com.br Oi Lucas Está dando um erro, já tentei colocar esse código de várias formas, mas não funciona. O erro é o seguinte: Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 891, in do_useMacro Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 536, in do_optTag_tal Module zope.tal.talinterpreter, line 521, in do_optTag Module zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 949, in do_defineSlot Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 891, in do_useMacro Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 824, in do_loop_tal Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 536, in do_optTag_tal Module zope.tal.talinterpreter, line 521, in do_optTag Module zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 623, in do_insertText_tal Module Products.PageTemplates.Expressions, line 228, in evaluateText Module zope.tales.tales, line 696, in evaluate - URL: portlet_destaques - Line 39, Column 13 - Expression: PythonExpr obj.effective.strftime('%d-%m-%Y') - Names: {'container': PloneSite at / Plone , 'context': PloneSite at / Plone , 'default': object object at 0x0072A528, 'here': PloneSite at /Plone, 'loop': {u'obj': Products.PageTemplates.Expressions.PathIterator object at 0x1232B3D0}, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.Expressions.SafeMapping object at 0x121A39B8, 'request': HTTPRequest, URL=http://localhost:8080/index_html http://localhost:8080/index_html , 'root': Application at , 'template': ZopePageTemplate at /index_html, 'traverse_subpath': [], 'user': PropertiedUser 'admin'} Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: obj.effective.strftime('%d-%m-%Y') Module PythonExpr, line 1, in expression Module DateTime.DateTime, line 1494, in strftime ValueError: year=1000 is before 1900; the datetime strftime() methods require year = 1900 -- Lucas Aquino Liberiun lucasaqu...@liberiun.com mailto:lucasaqu...@liberiun.com http://www.liberiun.com http://www.liberiun.com +55 61 3468-2662
Re: [zope-pt] Exportar lista de emails
2009/1/20 Roberto Alcântara robertoalcant...@gmail.com Pessoal, Existe alguma forma razoavelmente simples no Zope/Plone para exportar os nomes/emails dos usuários? Não achei nada pelos menus :P sds, - Roberto É possível fazer o que você quer por meio de scripts simples. Não utilizo as versões mais novas do Plone, mas no Tchezope há uma tradução do Guia Definitivo do Plone e no capítulo de segurança há alguns exemplos de scprits para manipulação dos dados dos usuários [1] . Dá uma olhada lá, pois pode ser de alguma ajuda para você. Zénrique. [1] http://www.tchezope.org/documentacao/manual/o-guia-definitivo-do-plone/configurando-a-seguranca-e-os-usuarios