Re: Using alternatives to Zope's DateTime module in PageTemplates
"Charlie Clark" <[email protected]> Tue, 24 Oct 2006 22:43:38 +0200
| Newsgroups | gmane.comp.web.zope.page-templates |
|---|---|
| Organization | eGenix.com |
| Message-ID | <[email protected]> |
Am 24.10.2006, 22:26 Uhr, schrieb Dieter Maurer <[email protected]>: > Charlie Clark wrote at 2006-10-23 16:03 +0200: >> ... >> ah, the problem seems that Python datetime returns extension types and >> not >> classes and Zope's security does not work with extension types! > It does, but you need to use "allowType"... Thanks for that. import datetime allow_type(datetime.datetime) do work but calling strftime() on a datetime object throws an import error Error Type: ImportError Error Value: import of "__doc__" from "time" is unauthorized. You are not allowed to access '__doc__' in this context Is this correct? This is the same error thrown when using a wrapper class that uses getattr(datime_object, method_name) instead of overwriting the methods. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free!