Discussion:
[Erp5-dev] Zope's get_request()
Alexandre Boeglin
2004-11-24 15:53:56 UTC
Permalink
Hello,

In Zope 2.7, the get_request() function is "pushed" from the Localizer
Product to Global when it is running its __init__.py.

What happens sometimes (depending on the currently installed products)
is that the ERP5 Products are loaded prior to the Localizer Product,
and then, the get_request() function is not available from Global.

What we do now is "pulling" get_request() from Localizer to
ERP5Types.Utils, so from now, please use "from Products.ERP5Type.Utils
import get_request" to access it.

Does it sound okay ? Should it be reported to Zope devs ? Or is there a
better way ?

Regards,
Alex
Yoshinori Okuji
2004-11-24 16:07:08 UTC
Permalink
Post by Alexandre Boeglin
What we do now is "pulling" get_request() from Localizer to
ERP5Types.Utils, so from now, please use "from
Products.ERP5Type.Utils import get_request" to access it.
This is one way. Another way is to make sure that ERP5Type is loaded
before CMFActivity or ERP5Form (like "import ERP5Type in __init__.py).
I don't know which is better.

YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Loading...