getFormatter

[email protected]
Newsgroups gmane.comp.web.zope.german
Message-ID <OFD092BEAB.0F50E06A-ONC125783F.00461407-C125783F.00467D99@jci.com>
Hallo da draussen!

In den Release Notes von Zope 2.11 steht
folgendes:

The ZPublisher HTTP request has now both the debug
and locale

attributes available, like its Zope 3 counterpart.
The debug attribute

was so far limited to code from the zope.*
namespace in order to make

the Zope 3 ZPT engine work. The locale attribute
provides access to an

zope.i18n.interfaces.locales.ILocale object
with access to locale

related information like date / time formatting
or translated language

and country names. Form variables of both debug
and locale will shadow

these two attributes and their use is therefor
discouraged.

Ich hatte gehofft, dass ich
jetzt in einem Page Template genauso wie in Zope 3 folgendes benutzen könnte:

python:request.locale.dates.getFormatter('dateTime')

Aber das funktioniert leider nicht.
Ich muss gestehen dass ich den letzten Teil der Bemerkung in den Release
Notes nicht verstehe, vielleicht liegt es daran.

Kann mir jemand einen Tipp geben, wie
ich auf einfache Art und Weise ein Datum in einem Page Template formatieren
kann?

Danke & Gruss,

Sascha



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.