[Zope] Tutorial for zope4
Good morning list,Glad to be here again in the list and community I used zope many years ago until version 2.13 and I want to update to the new version 4/5 but I have found that the Zope Book is not so useful to me as before. I used to do me little systems all in the ZMI using pagetemplate, zsql method, postgresql, zserver, etc. -Zserver was replaced in favor of waitress, no problem. -pagetemplate is almost the same, but now use chameleon engine, no problem. -zsqlmethod is not installed by default, I installed it using pip. The recommendation is to use zope.sqlalchemy. I dont know sqlalchemy and how to use it with zope 4/5. help here -I tried to find the postgresql connector to zope 4 in pypi without success, even the ODBC connector I could not find it. how do I connect to a database? Also, I saw that the Plone foundation have now the rights of Zope foundation. I wish them the best for his work. do someone can recomend me a zope 4 tutorial for dummys? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope.org dead?
zope.org dead? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2 Status
2016-11-11 5:20 GMT-06:00 Hanno Schlichting: > On Thu, Nov 10, 2016, at 09:12, Michael Howitz wrote: > > You are right, it might look strange to have a Zope2 version 4.x. > > But renaming the Package on PyPI would cause problems for all packages > > which depend on Zope 4.x, especially for the ones which are even > > compatible with Zope 2.x and 4.x. > > I agree that having the project/distribution name as Zope2 and the > version as 4.x, 5.x, etc. isn't ideal. > > But by now there are probably hundreds of other projects, which depend > on Zope2 in their setup.py. Not to mention all kinds of buildout files, > testing configurations or tools, the configuration for sites like > https://zope3.pov.lt/py3/ and many other things we don't know about. > > > @Hanno: What do you think about renaming the PyPI package to Zope? > > I think this is a cosmetic change, which at this point causes too much > work and breakage for very little gain. > > Hanno > And why not start a new package call "zope" (in PyPi) that it's really version 4. it's alpha version so no many projects are using it. -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2 Status
2016-11-07 1:18 GMT-06:00 Michael Howitz <m...@gmx.net>: > Am 04.10.2016 um 22:39 schrieb Miguel Beltran R. <yourpa...@gmail.com>: > > 2016-10-04 7:27 GMT-05:00 Michael Brunnbauer <bru...@netestate.de>: > […] > >> Now this page offers version 4.0a2 - the a indicating alpha status - but > > > > I think this break the intention of https://zope.readthedocs.io/en > /latest/WHATSNEW.html#version-numbering-increase > > The package should be https://pypi.python.org/pypi/Zope4/ > > Why do you think we need a rename of the package? > > > > -- > Mit herzlichen Grüßen > Michael Howitz > > Because the package name https://pypi.python.org/pypi/zope doesn't exists, actually is using the number version (https://pypi.python.org/pypi/zope2) Also Zope4 break/drop compatibility with Zope 2 The page says it's version 4 Break the installion using pip install -r https://raw.githubusercontent. com/zopefoundation/Zope/2.13.24/requirements.txt (see my other email) <https://raw.githubusercontent.com/zopefoundation/Zope/2.13.24/requirements.txt> -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2 Status
2016-10-04 7:27 GMT-05:00 Michael Brunnbauer: > > hi all, > > I used to watch https://pypi.python.org/pypi/Zope2/ for Zope 2 updates. > Last > version I updated to was 2.13.24. > > Now this page offers version 4.0a2 - the a indicating alpha status - but > > I think this break the intention of https://zope.readthedocs.io/en/latest/WHATSNEW.html#version-numbering-increase The package should be https://pypi.python.org/pypi/Zope4/ -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] requirements.txt 2.13.24 install zope 4 instead zope2
Ok, I found the solution. Just download the requirements.txt file and append to the end "Zope2 == 2.13.24" (without quotes) This install the correct Zope2 version after that installing Products.ZSQLMethods with pip install the correct version ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] requirements.txt 2.13.24 install zope 4 instead zope2
Also installing Products.ZSQLMethods upgrade zope products to version 4 >pip install Products.ZSQLMethods Installing collected packages: Products.ZSQLMethods, zope.pagetemplate, zope.browserpage, AuthEncoding, zExceptions, AccessControl, zope.browserresource Found existing installation: zope.pagetemplate 3.5.2 Uninstalling zope.pagetemplate-3.5.2: Successfully uninstalled zope.pagetemplate-3.5.2 Found existing installation: zope.browserpage 3.12.2 Uninstalling zope.browserpage-3.12.2: Successfully uninstalled zope.browserpage-3.12.2 Found existing installation: zExceptions 2.13.0 Uninstalling zExceptions-2.13.0: Successfully uninstalled zExceptions-2.13.0 Found existing installation: AccessControl 2.13.14 Uninstalling AccessControl-2.13.14: Successfully uninstalled AccessControl-2.13.14 Found existing installation: zope.browserresource 3.10.3 Uninstalling zope.browserresource-3.10.3: Successfully uninstalled zope.browserresource-3.10.3 Successfully installed AccessControl-4.0a3 AuthEncoding-4.0.0 Products.ZSQLMethods-2.13.4 zExceptions-3.4 zope.browserpage-4.1.0 zope.browserresource-4.1.0 zope.pagetemplate-4.2.1 >pip list AccessControl (4.0a3) ** Acquisition (2.13.9) AuthEncoding (4.0.0) ** BTrees (4.3.1) Chameleon (2.25) DateTime (2.12.8) DocumentTemplate (2.13.2) docutils (0.12) ExtensionClass (2.13.2) five.globalrequest (1.0) initgroups (2.13.0) Jinja2 (2.8) MarkupSafe (0.23) mechanize (0.2.5) Missing (2.13.1) mr.developer (1.34) MultiMapping (2.13.0) Paste (1.7.5.1) PasteDeploy (1.3.4) PasteScript (1.7.5) Persistence (2.13.2) persistent (4.2.1) pip (8.1.2) Products.BTreeFolder2 (2.13.5) Products.ExternalMethod (2.13.1) Products.MailHost (2.13.2) Products.MIMETools (2.13.0) Products.OFSP (2.13.2) Products.PythonScripts (2.13.2) Products.StandardCacheManagers (2.13.1) Products.ZCatalog (2.13.27) Products.ZCTextIndex (2.13.5) Products.ZSQLMethods (2.13.4) Pygments (2.1.2) pytz (2015.7) Record (2.13.0) repoze.retry (1.2) repoze.tm2 (1.0) repoze.who (2.0) RestrictedPython (3.6.0) setuptools (20.2.2) six (1.10.0) sourcecodegen (0.6.14) Sphinx (1.0.8) tempstorage (2.12.2) transaction (1.1.1) waitress (1.0.0) wheel (0.30.0a0) z3c.checkversions (0.5) z3c.pt (3.0) zc.buildout (2.3.1) zc.lockfile (1.0.2) zc.recipe.egg (2.0.3) zc.recipe.testrunner (1.2.1) ZConfig (2.9.3) zdaemon (2.0.7) zExceptions (3.4) ** zLOG (2.11.2) ZODB (5.0.0) ZODB3 (3.10.5) zodbpickle (0.6.0) zope.annotation (3.5.0) zope.broken (3.6.0) zope.browser (1.3) zope.browsermenu (3.9.1) zope.browserpage (4.1.0) ** zope.browserresource (4.1.0) ** zope.component (3.9.5) zope.configuration (3.7.4) zope.container (3.11.2) zope.contentprovider (3.7.2) zope.contenttype (3.5.5) zope.deferredimport (3.5.3) zope.dottedname (3.4.6) zope.event (3.5.2) zope.exceptions (3.6.2) zope.filerepresentation (3.6.1) zope.globalrequest (1.2) zope.i18n (3.7.4) zope.i18nmessageid (3.5.3) zope.interface (3.6.7) zope.lifecycleevent (3.6.2) zope.location (3.9.1) zope.pagetemplate (4.2.1) ** zope.processlifetime (1.0) zope.proxy (3.6.1) zope.ptresource (3.9.0) zope.publisher (3.12.6) zope.schema (3.7.1) zope.security (3.7.4) zope.sendmail (3.7.5) zope.sequencesort (3.4.0) zope.site (3.9.2) zope.size (3.4.1) zope.structuredtext (3.5.1) zope.tal (3.5.2) zope.tales (3.5.3) zope.testbrowser (3.11.1) zope.testing (3.9.7) zope.traversing (3.13.2) zope.viewlet (3.7.2) Zope2 (4.0a2) ZopeUndo (2.12.0) I dont know this affect, ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] requirements.txt 2.13.24 install zope 4 instead zope2
I have installed zope2 using virtualenv and pip (1) but it's installing the new version of zope2 >pip list AccessControl (2.13.14) Acquisition (2.13.9) BTrees (4.3.1) Chameleon (2.25) DateTime (2.12.8) DocumentTemplate (2.13.2) docutils (0.12) ExtensionClass (2.13.2) five.globalrequest (1.0) initgroups (2.13.0) Jinja2 (2.8) MarkupSafe (0.23) mechanize (0.2.5) Missing (2.13.1) mr.developer (1.34) MultiMapping (2.13.0) Paste (1.7.5.1) PasteDeploy (1.3.4) PasteScript (1.7.5) Persistence (2.13.2) persistent (4.2.1) pip (8.1.2) Products.BTreeFolder2 (2.13.5) Products.ExternalMethod (2.13.1) Products.MailHost (2.13.2) Products.MIMETools (2.13.0) Products.OFSP (2.13.2) Products.PythonScripts (2.13.2) Products.StandardCacheManagers (2.13.1) Products.ZCatalog (2.13.27) Products.ZCTextIndex (2.13.5) Pygments (2.1.2) pytz (2015.7) Record (2.13.0) repoze.retry (1.2) repoze.tm2 (1.0) repoze.who (2.0) RestrictedPython (3.6.0) setuptools (20.2.2) six (1.10.0) sourcecodegen (0.6.14) Sphinx (1.0.8) tempstorage (2.12.2) transaction (1.1.1) waitress (1.0.0) wheel (0.30.0a0) z3c.checkversions (0.5) z3c.pt (3.0) zc.buildout (2.3.1) zc.lockfile (1.0.2) zc.recipe.egg (2.0.3) zc.recipe.testrunner (1.2.1) ZConfig (2.9.3) zdaemon (2.0.7) zExceptions (2.13.0) zLOG (2.11.2) ZODB (5.0.0) ZODB3 (3.10.5) zodbpickle (0.6.0) zope.annotation (3.5.0) zope.broken (3.6.0) zope.browser (1.3) zope.browsermenu (3.9.1) zope.browserpage (3.12.2) zope.browserresource (3.10.3) zope.component (3.9.5) zope.configuration (3.7.4) zope.container (3.11.2) zope.contentprovider (3.7.2) zope.contenttype (3.5.5) zope.deferredimport (3.5.3) zope.dottedname (3.4.6) zope.event (3.5.2) zope.exceptions (3.6.2) zope.filerepresentation (3.6.1) zope.globalrequest (1.2) zope.i18n (3.7.4) zope.i18nmessageid (3.5.3) zope.interface (3.6.7) zope.lifecycleevent (3.6.2) zope.location (3.9.1) zope.pagetemplate (3.5.2) zope.processlifetime (1.0) zope.proxy (3.6.1) zope.ptresource (3.9.0) zope.publisher (3.12.6) zope.schema (3.7.1) zope.security (3.7.4) zope.sendmail (3.7.5) zope.sequencesort (3.4.0) zope.site (3.9.2) zope.size (3.4.1) zope.structuredtext (3.5.1) zope.tal (3.5.2) zope.tales (3.5.3) zope.testbrowser (3.11.1) zope.testing (3.9.7) zope.traversing (3.13.2) zope.viewlet (3.7.2) Zope2 (4.0a2) ZopeUndo (2.12.0) the new version does not include mkzopeinstace, instead inclue mkswiinstance (1) myenv\scripts\pip install -r https://raw.githubusercontent.com/zopefoundation/Zope/2.13.24/requirements.txt It should be Zope4, how do I can install zope2.13.24? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.13 + MS SQL Server 2008 + UTF8
2016-07-22 16:55 GMT-05:00 Miguel Beltran R. <yourpa...@gmail.com>: > > * agrega_credencial (zsql method) > "insert into credencial (nombre) values ( N' type="nb">')" > > > I did some changes to the zsql method to "insert into credencial (nombre) values (N) where scripts is a folder object, and txt__py is a python script object -- txt__py (parameter s) try: if s == None: u=u'' elif same_type(s,''): try: u=s.decode('utf-8') except UnicodeDecodeError: u=s elif same_type(s,u''): u=s else: u='data not valid type' except Exception, e: return "error decoding" After this change it's working like I expect. The idea came from here (1). now the question, what it's the scope of the settings in the zope.conf file where the enconding is set? it only affect html page render? (1) http://pgbovine.net/unicode-python.htm Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope 2.13 + MS SQL Server 2008 + UTF8
Hi again list After have setup my zope site and database to use ISO-8859-1, I did some test and unfortunely it fail with javascript doing AJAX calls because the standart says that all calls must be UTF8 nevertheless the chatset in the page. So now I'm changing to use UTF8, but I have another problems: the data is stored in incorrect way. I tried to save "test áñ" but it's stored "test áñ" My setup -Windows 7 -Zope 2.13.23 -MS Sql server 2008 --zope.conf rest-input-encoding utf-8 rest-output-encoding utf-8 default-zpublisher-encoding utf-8 --python file site.py encoding = "utf-8" --html header The pages * index_html (dtml-document) containt the html FORM *estado.html ( dtml-method) according to a field from the FORM, it call differents pages, in this case to "agregar.html" * agregar.html (dtml-document) recive the data and call the Zsql (agrega_credencial) * agrega_credencial (zsql method) "insert into credencial (nombre) values ( N'')" --MS SQL Server the fields are nvarchar --SQL Server management (admin tool) here is were I see that the data is stored like "test áñ", but even if I use the agrega_credencial (zsql method) using the ZMI the data is not saved correctly. What do I need to use UTF8 in my setup? What I'm missing? Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ODBC adapter
With the help of Tres Seaver I have working my site. Thanks again Tres!!! I know that egenix have the most complete and well working ODBC adapter, but ZpyODBCDA do the work for my needs 2016-07-05 10:39 GMT-05:00 Andreas Jung <li...@zopyx.com>: > http://www.egenix.com/products/python/mxODBC/ > > is the only reasonable ODBC approach for Zope nowadays...forget the other > old crap. > > -aj > > On 4 Jul 2016, at 18:08, Miguel Beltran R. wrote: > > > Hi again list, > > > > Using zope 2.13.23 > > ZPyODBCDA 1.0.9.dev0 ( https://github.com/tcurvelo/Products.ZPyODBCDA ) > > > > I have tried to install ZpyODBCDA but when I try to start the instance i > > got this error > > > > (control-emisiones3) > > N:\zope\control-emisiones3>"N:\zope\control-emisiones3\Scripts\runzope" > -C > > "N:\zope\control-emisiones3\instance_zope\etc\zope.conf" > > > > 2016-07-04 10:48:05 ERROR Application Could not import Products.ZPyODBCDA > > Traceback (most recent call last): > > File "n:\zope\control-emisiones3\lib\site-packages\OFS\Application.py", > > line 606, in import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\__init__.py", > > line 27, in > > from pyodbc_browser import pyodbcConnectionBrowser, > > addpyodbcConnectionBrowser, addpyodbcConnectionForm > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_browser.py", > > line 23, in > > from pyodbc_DA import pyodbcConnection, database_type, > > addpyodbcConnectionForm > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_DA.py", > > line 27, in > > from pyodbc_db import DB > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_db.py", > > line 37, in > > from Shared.DC.ZRDB.TM import TM > > ImportError: No module named ZRDB.TM > > Traceback (most recent call last): > > File "C:\Python27\Lib\runpy.py", line 162, in _run_module_as_main > > "__main__", fname, loader, pkg_name) > > File "C:\Python27\Lib\runpy.py", line 72, in _run_code > > exec code in run_globals > > File "N:\zope\control-emisiones3\Scripts\runzope.exe\__main__.py", line > > 9, in > > > > File > "n:\zope\control-emisiones3\lib\site-packages\Zope2\Startup\run.py", > > line 22, in run > > starter.prepare() > > File > > "n:\zope\control-emisiones3\lib\site-packages\Zope2\Startup\__init__.py", > > line 86, in prepare > > self.startZope() > > File > > "n:\zope\control-emisiones3\lib\site-packages\Zope2\Startup\__init__.py", > > line 262, in startZope > > Zope2.startup() > > File "n:\zope\control-emisiones3\lib\site-packages\Zope2\__init__.py", > > line 47, in startup > > _startup() > > File > "n:\zope\control-emisiones3\lib\site-packages\Zope2\App\startup.py", > > line 67, in startup > > OFS.Application.import_products() > > File "n:\zope\control-emisiones3\lib\site-packages\OFS\Application.py", > > line 583, in import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "n:\zope\control-emisiones3\lib\site-packages\OFS\Application.py", > > line 606, in import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\__init__.py", > > line 27, in > > from pyodbc_browser import pyodbcConnectionBrowser, > > addpyodbcConnectionBrows > > er, addpyodbcConnectionForm > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_browser.py", > > line 23, in > > from pyodbc_DA import pyodbcConnection, database_type, > > addpyodbcConnectionForm > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_DA.py", > > line 27, in > > from pyodbc_db import DB > > File > > > "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_db.py", > > line 37, in > > from Shared.DC.ZRDB.TM import TM > > ImportError: No module named ZRDB.TM > > > > > > What module do I need to install? > > > > > > > > -- > > > > Lo bueno de vivir un dia mas > > es saber que nos queda un dia menos de vida > > ___ > > Zope maillist - Zope@zope.org > > https://mail.zope.org/mailman/listinfo/zope > > ** No cross posts or HTML encoding! ** > > (Related lists - > > https://mail.zope.org/mailman/listinfo/zope-announce > > https://mail.zope.org/mailman/listinfo/zope-dev ) > -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ODBC adapter
Hi again list, Using zope 2.13.23 ZPyODBCDA 1.0.9.dev0 ( https://github.com/tcurvelo/Products.ZPyODBCDA ) I have tried to install ZpyODBCDA but when I try to start the instance i got this error (control-emisiones3) N:\zope\control-emisiones3>"N:\zope\control-emisiones3\Scripts\runzope" -C "N:\zope\control-emisiones3\instance_zope\etc\zope.conf" 2016-07-04 10:48:05 ERROR Application Could not import Products.ZPyODBCDA Traceback (most recent call last): File "n:\zope\control-emisiones3\lib\site-packages\OFS\Application.py", line 606, in import_product product=__import__(pname, global_dict, global_dict, silly) File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\__init__.py", line 27, in from pyodbc_browser import pyodbcConnectionBrowser, addpyodbcConnectionBrowser, addpyodbcConnectionForm File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_browser.py", line 23, in from pyodbc_DA import pyodbcConnection, database_type, addpyodbcConnectionForm File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_DA.py", line 27, in from pyodbc_db import DB File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_db.py", line 37, in from Shared.DC.ZRDB.TM import TM ImportError: No module named ZRDB.TM Traceback (most recent call last): File "C:\Python27\Lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python27\Lib\runpy.py", line 72, in _run_code exec code in run_globals File "N:\zope\control-emisiones3\Scripts\runzope.exe\__main__.py", line 9, in File "n:\zope\control-emisiones3\lib\site-packages\Zope2\Startup\run.py", line 22, in run starter.prepare() File "n:\zope\control-emisiones3\lib\site-packages\Zope2\Startup\__init__.py", line 86, in prepare self.startZope() File "n:\zope\control-emisiones3\lib\site-packages\Zope2\Startup\__init__.py", line 262, in startZope Zope2.startup() File "n:\zope\control-emisiones3\lib\site-packages\Zope2\__init__.py", line 47, in startup _startup() File "n:\zope\control-emisiones3\lib\site-packages\Zope2\App\startup.py", line 67, in startup OFS.Application.import_products() File "n:\zope\control-emisiones3\lib\site-packages\OFS\Application.py", line 583, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "n:\zope\control-emisiones3\lib\site-packages\OFS\Application.py", line 606, in import_product product=__import__(pname, global_dict, global_dict, silly) File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\__init__.py", line 27, in from pyodbc_browser import pyodbcConnectionBrowser, addpyodbcConnectionBrows er, addpyodbcConnectionForm File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_browser.py", line 23, in from pyodbc_DA import pyodbcConnection, database_type, addpyodbcConnectionForm File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_DA.py", line 27, in from pyodbc_db import DB File "N:\zope\control-emisiones3\instance_zope\Products\ZPyODBCDA\pyodbc_db.py", line 37, in from Shared.DC.ZRDB.TM import TM ImportError: No module named ZRDB.TM What module do I need to install? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.13.23 installation
I found the issue https://github.com/pypa/pip/issues/3028 And just for the record. (control) N:\zope\control>Scripts\pip.exe -V pip 8.1.2 from n:\zope\control\lib\site-packages (python 2.7) (control-emisiones3) N:\zope\control>Scripts\pip.exe list AccessControl (2.13.13) Acquisition (2.13.9) DateTime (2.12.8) DocumentTemplate (2.13.2) docutils (0.12) ExtensionClass (2.13.2) initgroups (2.13.0) Jinja2 (2.7.3) MarkupSafe (0.23) mechanize (0.2.5) Missing (2.13.1) mr.developer (1.33) MultiMapping (2.13.0) nt-svcutils (2.13.0) Paste (1.7.5.1) PasteDeploy (1.3.4) PasteScript (1.7.5) Persistence (2.13.2) pip (8.1.2) Products.BTreeFolder2 (2.13.5) Products.ExternalMethod (2.13.1) Products.MailHost (2.13.2) Products.MIMETools (2.13.0) Products.OFSP (2.13.2) Products.PythonScripts (2.13.2) Products.StandardCacheManagers (2.13.1) Products.ZCatalog (2.13.27) Products.ZCTextIndex (2.13.5) Pygments (2.0.2) pytz (2015.4) Record (2.13.0) repoze.retry (1.2) repoze.tm2 (1.0) repoze.who (2.0) RestrictedPython (3.6.0) setuptools (18.0.1) Sphinx (1.0.8) tempstorage (2.12.2) transaction (1.1.1) wheel (0.29.0) z3c.checkversions (0.5) zc.buildout (2.3.1) zc.lockfile (1.0.2) zc.recipe.egg (2.0.3) zc.recipe.testrunner (1.2.1) ZConfig (2.9.3) zdaemon (2.0.7) zExceptions (2.13.0) zLOG (2.11.2) ZODB3 (3.10.5) zope.annotation (3.5.0) zope.broken (3.6.0) zope.browser (1.3) zope.browsermenu (3.9.1) zope.browserpage (3.12.2) zope.browserresource (3.10.3) zope.component (3.9.5) zope.configuration (3.7.4) zope.container (3.11.2) zope.contentprovider (3.7.2) zope.contenttype (3.5.5) zope.deferredimport (3.5.3) zope.dottedname (3.4.6) zope.event (3.5.2) zope.exceptions (3.6.2) zope.filerepresentation (3.6.1) zope.i18n (3.7.4) zope.i18nmessageid (3.5.3) zope.interface (3.6.7) zope.lifecycleevent (3.6.2) zope.location (3.9.1) zope.pagetemplate (3.5.2) zope.processlifetime (1.0) zope.proxy (3.6.1) zope.ptresource (3.9.0) zope.publisher (3.12.6) zope.schema (3.7.1) zope.security (3.7.4) zope.sendmail (3.7.5) zope.sequencesort (3.4.0) zope.site (3.9.2) zope.size (3.4.1) zope.structuredtext (3.5.1) zope.tal (3.5.2) zope.tales (3.5.3) zope.testbrowser (3.11.1) zope.testing (3.9.7) zope.traversing (3.13.2) zope.viewlet (3.7.2) Zope2 (2.13.23) ZopeUndo (2.12.0) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.13.23 installation
If you want to use pip: > > $ ./bin/pip install \ > > > https://raw.githubusercontent.com/zopefoundation/Zope/2.13.23/requirements.txt > > > Tres. > - -- > I have tried to install zope 2.13.23 using this method in Windows 7 but it give me error with zc.recipe.egg. The steps are: 1.- Install python 2.7 2.- Upgrade pip: (python -m pip install -U pip) 3.- Install virtualenv (pip install virtualenv) 4.- Install MS C compiler for python (download and install http://aka.ms/vcpython27) 5.- Build enviroment a) cd \zope b) virtualenv -p c:\python27\python.exe myinstance 6.- Install zope package a) cd \zope\myinstance b) scripts\active c) SET LIB=c:\python27\lib d) scripts\pip install -r https://raw.githubusercontent.com/zopefoundation/Zope/2.13.23/requirements.txt Installing collected packages: setuptools, zope.interface, zope.event, zope.sche ma, zope.proxy, zope.component, zope.location, zope.i18nmessageid, zope.configur ation, zope.security, zope.contenttype, zope.browser, pytz, zope.i18n, zope.exce ptions, zope.publisher, zExceptions, ExtensionClass, Acquisition, RestrictedPyth on, transaction, zc.lockfile, ZConfig, zdaemon, ZODB3, Record, Persistence, zope .deferredimport, DateTime, zope.testing, AccessControl, zope.structuredtext, zop e.sequencesort, DocumentTemplate, MarkupSafe, Jinja2, Missing, MultiMapping, Pas te, PasteDeploy, PasteScript, zope.lifecycleevent, zope.broken, zope.filereprese ntation, zope.size, zope.traversing, zope.dottedname, zope.container, zope.annot ation, zope.site, Products.ZCTextIndex, Products.ExternalMethod, zope.tal, zope. tales, zope.pagetemplate, ZopeUndo, tempstorage, Products.OFSP, Products.ZCatalo g, zope.sendmail, Products.PythonScripts, Products.MailHost, mechanize, zope.tes tbrowser, zLOG, nt-svcutils, zope.browserpage, docutils, zope.browsermenu, zope. contentprovider, Products.StandardCacheManagers, zope.viewlet, zope.processlifet ime, zope.browserresource, initgroups, Products.MIMETools, zope.ptresource, Zope 2, Products.BTreeFolder2, Pygments, Sphinx, zc.buildout, mr.developer, repoze.re try, repoze.tm2, repoze.who, z3c.checkversions, zc.recipe.egg, zc.recipe.testrun ner Found existing installation: setuptools 23.1.0 Uninstalling setuptools-23.1.0: Successfully uninstalled setuptools-23.1.0 zc.recipe.egg is in an unsupported or invalid wheel could someone confirm please? If before the step 6d (pip install) I install the zc.recipe.egg with "scripts\easy_install.exe" the pip command is executed correctly -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problemwith unicode
After search a while, someone can confirm if I undestand it well? the problem is because it is trying to decode to "ascii" instead of "iso-8859-1" if it's true, why is doing it? I set to use iso-8859-1 in my conf file 2016-06-28 16:56 GMT-05:00 Miguel Beltran R. <yourpa...@gmail.com>: > Hi list, my system is Zope 2.11.4 with default enconding iso-8859-1 for > in/out and SQL Server 2008. > > I'm trying to fix a bad desing with a sql server database. it has a mix of > encodings, traditional_spanish and modern_spanish. And some tables with > both type of fields, unicode and normal (nvarchar and varchar) . > > The new database is Latin-1 enconding (SQL_Latin1_General_CP1_CI_AI) with > only varchar fields. > > Using the ZMI if I check the "Z SQL Method" the data is displayed > correctly, but using a "page template" it gives me this error > > > *Expression: * > > {'container': /control-emisiones/oficio/alta>, > 'context': /control-emisiones/oficio/alta>, > 'default': , > 'here': /control-emisiones/oficio/alta>, > 'loop': {u'items': at 0x078877D0>}, > 'nothing': None, > 'options': {'busqueda': 1, 'args': ()}, > 'repeat': 0x07802530>, > 'request': <HTTPRequest, > URL=http://10.28.1.2:91/control-emisiones/oficio/alta/index_html>, > 'root': , > 'template': /control-emisiones/campos/campo__oficio_tipo>, > 'traverse_subpath': [], > 'user': } > > - Module zope.tales.expressions, line 263, in __call__UnicodeDecodeError: > 'ascii' codec can't decode byte 0xf3 in position 10: ordinal not in > range(128) > > > The data transfer was made using database tools (DTWizard). > > why it is happening this? > > > -- > > Lo bueno de vivir un dia mas > es saber que nos queda un dia menos de vida > -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Problemwith unicode
Hi list, my system is Zope 2.11.4 with default enconding iso-8859-1 for in/out and SQL Server 2008. I'm trying to fix a bad desing with a sql server database. it has a mix of encodings, traditional_spanish and modern_spanish. And some tables with both type of fields, unicode and normal (nvarchar and varchar) . The new database is Latin-1 enconding (SQL_Latin1_General_CP1_CI_AI) with only varchar fields. Using the ZMI if I check the "Z SQL Method" the data is displayed correctly, but using a "page template" it gives me this error *Expression: * {'container': , 'context': , 'default': , 'here': , 'loop': {u'items': }, 'nothing': None, 'options': {'busqueda': 1, 'args': ()}, 'repeat': , 'request':, 'root': , 'template': , 'traverse_subpath': [], 'user': } - Module zope.tales.expressions, line 263, in __call__UnicodeDecodeError: 'ascii' codec can't decode byte 0xf3 in position 10: ordinal not in range(128) The data transfer was made using database tools (DTWizard). why it is happening this? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Using Template in script (python)
Hi list, I'm trying to use the make a string using a Template and fill it with the result of a query, but gime this error You are not allowed to access 'safe_substitute' in this context Zope = 2.12 from string import Template rst=someSQL()[0] txt=Template( span id=datos_vehiculo data-placa=${placa} data-serie=${serie} data-marca=${marca} data-submarca=${submarca} data-modelo=${modelo} /span ) newtxt=txt.safe_substitute(rst) do exist some way to do it? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope2 - pro/contra
When I started with Zope I loved its Zope Book. It was a super simple amd well documented book with a lot of examples. Zope3 and all that came later does not have it in my opinion. I saw right now jinja2 and doesn't like. insert code between html code in that way remember me dtml. it was good in its time but ot any more. In resume: ZPT and zope2 are excellent tools for who knows use it. The zope 2 book was a great help. The help in Pascal and visual basic 6 were also good help with many and not-just-see-how-call-the-command examples to learn the language. my 2 cents. 2015-03-10 12:03 GMT-06:00 Tom Gross itconse...@gmail.com: Again, I'm not sure if it is worth the thing but when I talk about marketing I don't mean just having a website. Everyone has one these days. Why should anyone visit especially the Zope website? I mean going to the people and talk to them, blog, tweet, whatever ... In the medieval times they knew better. The king went to the market to promote important things and not in his castle ... The success story of Zope did not start because it was a good product but it was mentioned in New York Times and people demanded it. Sales seems to be a taboo word in most OpenSource communities but I think it is essential to keep software alive. -Tom On 09.03.15 07:11, Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Gross wrote: Hello When it comes to Zope people seem to have 2 opinions. (Maybe that's the 2 in the name ;-) ). A lot of people seem to use it (with or even without Plone) and loving it and a lot of people call it dead because there is (almost) no new development. At least on the Zope package itself. I myself like to work with Zope too but I know web development changed in the last couple of years and there are other options around. I don't know if it is worth the thing but to have a future Zope needs - A MAINTAINER!!! - MARKETING! Oh, we great a not that bad Zope 2 site once in the past. Outcome? Zero. - DOCUMENTATION! Oh, we created a not so bad docs.zope.org site. Outcome? Zero. - Usability improvements (frameless, responsive ZMI) Waste of time... - Technical improvements (Port to Python3, WSGI, ...) Reasonable but too hard to achieve and it longer it takes the more pointless Zope will become. The technical improvements could be organized/financed with a pledgie the others are possibly harder to solve. Beat me for my realistic sarcasm but Zope is a zombie. Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJU/TmsAAoJEADcfz7u4AZjfU4Lv0XWBjruYNV5SaVUg7t9XaAa DVk61rQFSIevA3pdREebu6YEJSAvq3kIy8XrbfNGmLkxWArvK5JWOh5tf3qqsfw4 W/6y4JGSBQf9KpvgvRhf8ip1vj0Ie45fFnC86dTKBbauIOjeOPC3ZoHFA+2dNVWr E/wd421xUxwo03EjGQgCA8HJk3q9S3CXqf55UbVb5K0jwdotG2nYuAXd1C7c3eDN IN4n1P6HTQj67B3BOlJlU4d8UtPg5rkazGvps8h6z9as1TXBu9qGUO/RDb14Ry7f 9gRFwbq0fq9yI62yK3GruatQXgYx5HW79l7MQu8DsTUAab1aHeuIrPxKUX8wahjO MORo8c9sptnvciVcS96cgkO8fBfofECiCdrJmqKPOWxcZOuZ8/uIeZvxJfchNGiH 3ltFY96WxL0RE6b9mTxWh7zXKkcBtJkKNmhzNgRd7YhqNdd9do3jdA+W9rZys7wD 5Q2LErAI9HIzPQ9SV//83+E2pa1b8GA= =mH4E -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev ) -- Author of the book Plone 3 Multimedia - http://amzn.to/dtrp0C Tom Gross email..itconse...@gmail.com skype.tom_gross web.http://toms-projekte.de blog...http://blog.toms-projekte.de ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev ) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Product CalendarTag on zope2.13.19
Really you need this? Maybeyou could use a calendar with javascript just one example http://javascriptcalendar.org/javascript-date-picker.php I'm sure that exists many more 2013/3/28 Giampiero Benvenuti giampiero.benven...@chiaroscuro.com Thanks Johannes and Tres, the trick you both suggested works! I am forced to use this old product because I'll need to migrate a site (from zope2.10) that is using it. The Calendar product comes from here: http://old.zope.org/Members/teyc/CalendarTag/ Now, that the Calendar works, what should we do with it? Release it again with a new version number, or just forget about it? (It is old, indeed). regards, Giampiero On Mar 27, 2013, at 18:04 13, johannes raggam wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/27/2013 04:44 PM, Giampiero Benvenuti wrote: Still, one problem is this type of error: SyntaxError: Non-ASCII character '\xf1' in file /Applications/zope21319/Products/Calendar/CalendarTag.py on line 139, but no encoding declared; just place this line on top of the file: # -*- coding: utf-8 -*- with this, you declare the encoding of the file to be utf-8, which is probably the encoding you need. http://www.python.org/dev/peps/pep-0263/ what you describe sounds as if the Calendar product is not actively maintained. what usecase do you want to solve? where did you get the Calendar product from? best, johannes raggam - -- programmatic web development di(fh) johannes raggam / thet python plone zope development mail: off...@programmatic.pro web: http://programmatic.pro http://bluedynamics.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlFTJo0ACgkQW4mNMQxDgAd1UACgrZPkmA6qECH9kqplNG3vAz2N MNIAn1corxQzogbnr5MHe38SlSSI2xCo =zNPb -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev ) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mod_rewrite and IIS7
2012/2/6 Brian Sullivan briansulli...@gmail.com I am attempting to park Zope behind Windows 2008/IIS7 (using its mod_rewrite function) and seem to be having some difficulty getting it to work. What I want to do is make directory on Zope website look like it is a directory on an IIS7 website. I seem to be close but missing some critical element. Does anybody have a step by step process for doing this or samples of rules on IIS7 for doing something similar? ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev ) Hi Brian I do it using managedfusion-rewriter-3.5. First I add a site that repond only when is called with 'zope-site'. In its directory you will have a web.config file that you'll need to modify. http://iis7-site:80 - server by IIS 7 in port 80 http://zope-site:80 - server by Zope in port 90 -- --In my web.config: -- ?xml version=1.0 encoding=UTF-8? configuration configSections section name=managedFusion.rewriter type=ManagedFusion.Rewriter.Configuration.ManagedFusionRewriterSectionGroup/ /configSections managedFusion.rewriter xmlns= http://managedfusion.com/xsd/managedFusion/rewriter; rules engine=Apache / /managedFusion.rewriter system.webServer validation validateIntegratedModeConfiguration=false / modules runAllManagedModulesForAllRequests=true add name=RewriterModule type=ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter / /modules handlers add name=RewriterProxyHandler preCondition=integratedMode verb=* path=RewriterProxy.axd type=System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a / /handlers defaultDocument enabled=false / /system.webServer /configuration -- --In my ManagedFusion.Rewriter.txt file -- RewriteEngine On RewriteRule ^/(.*) http://localhost:90/VirtualHostBase/http/%{SERVER_NAME}:80/control-emisiones/VirtualHostRoot/$1[P,QSA,NC] -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] charset problems (utf-8)
2012/2/6 Hugo Ramos ram...@gmail.com But this doesn't seem to be the problem because templates encoded as utf-8 or iso-8859-1 all have the same problem. Any more ideas? are you played witth *default-zpublisher-encoding* option in zope.conf? Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Hosting with zope2 y bluebream
Hello List I need a hosting for a zope2 project, It's a old code but we need it at least 1 year more. In that time we want to rework our zope2 project to bluebream. Someone could give us a list of hosting providers? If the provider supports postgresql 9.1 will be wonderful. Thanks -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Hosting with zope2 y bluebream
2011/5/9 Miguel Beltran R. yourpa...@gmail.com Hello List I need a hosting for a zope2 project, It's a old code but we need it at least 1 year more. In that time we want to rework our zope2 project to bluebream. Someone could give us a list of hosting providers? If the provider supports postgresql 9.1 will be wonderful. Thanks I need zope 2.11, maybe 2.14 I don't remember well right now. Postgresql 9.1 with sha1 contrib module and others It will be a low traffic, used by 3-5 users. Probably will be 150-200MB of transffer by month. I think if you gives me the server with the software already installed I can do the maintenance myself. ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] problem connecting LdapUserFolder with Active Directory
2009/9/2 Jens Vagelpohl j...@dataflake.org -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sep 2, 2009, at 04:33 , Miguel Beltran R. wrote: OPERATIONS_ERROR: {'info': ': LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece', 'desc': 'Operations error'} The error message is informative enough I would say. An operation (probably a search) is being performed, but no bind has happened. Since there is a (simple) bind being performed in the code right before this error it appears AD does not like it. Maybe AD is not configured to allow sinple user/password binds. Or it is configured to only allow access from certain hosts, and the host with the Zope installation is not on that list. With AD, the possibilities for problems are endless. jens Thanks Jens, after a second look on directory LdapUserFolder (v2.12) I found README.ActiveDirectory.txt what say how configure correctly LUF My options was: All options in LdapUserFolder use default, except *Users Base DN = ou=Usuarios,ou=CEED,dc=ceed,dc=local *Groups Base DN = ou=Usuarios,ou=CEED,dc=ceed,dc=local *Manager DN = cn=zopeldap,ou=Usuarios,ou=CEED,dc=ceed,dc=local * Manager DN Usage = Always (before was for login data only) **important option** *read-only= on The server now connect to port 3268 ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] best option to use users from Active Directory?
2009/8/31 Andreas Jung li...@zopyx.com On 01.09.09 00:44, Miguel Beltran R. wrote: I only need valid the password users from active directoy I ask this because exists various add-ons for this LDAPUSerFolder? -aj Thanks A.J. -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] problem connecting LdapUserFolder with Active Directory
I tried connect to the server but raise a error 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 Products.LDAPUserFolder.LDAPUserFolder, line 441, in manage_edit - Module Products.LDAPUserFolder.LDAPDelegate, line 213, in connect - Module Products.LDAPUserFolder.SharedResource, line 115, in __call__ - Module ldap.ldapobject, line 508, in search_s - Module ldap.ldapobject, line 820, in search_ext_s - Module ldap.ldapobject, line 772, in _apply_method_s - Module ldap.ldapobject, line 502, in search_ext_s - Module ldap.ldapobject, line 428, in result - Module ldap.ldapobject, line 432, in result2 - Module ldap.ldapobject, line 438, in result3 - Module ldap.ldapobject, line 96, in _ldap_call OPERATIONS_ERROR: {'info': ': LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece', 'desc': 'Operations error'} I use Windows 2003. My domain is ceed.local All options in LdapUserFolder use default, except *Users Base DN = ou=Usuarios,ou=CEED,dc=ceed,dc=local *Groups Base DN = ou=Usuarios,ou=CEED,dc=ceed,dc=local *Manager DN = cn=zopeldap,ou=Usuarios,ou=CEED,dc=ceed,dc=local read-only= on Ldap server added with IP address. can someone tell me what I doing wrong? Thanks -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] is possible use request.set in a zpt?
2009/8/25 José Henrique jhr...@gmail.com 2009/6/26 Miguel Beltran R. yourpa...@gmail.com: Hi list I used before with dtml something like this dtml-call request.set('sumVar',0) dtml-in ... dtml-call request.set('sumVar', sumVar + queryVar) /dtml-in The sum is dtml-var sumVar This is possible to made with ZPT? -- What about this way: dtml-in expr=(1,2,3) prefix=rows dtml-var expr=rows_itembr dtml-if expr=rows_end Total: dtml-var expr=rows_total_item /dtml-if /dtml-in José Henrique How say Andreas and Tres, I made a script [suma_py] parameters: rec, campo code: suma=0 for r in rec: suma+=r[campo] return suma [index_html] div tal:define=items aquery() div tal:repeat=item items ... /div div el importe es span tal:content=suma_py(items, 'importe') la cantidad es span tal:content=suma_py(items, 'cantidad') /div /div -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] best option to use users from Active Directory?
I only need valid the password users from active directoy I ask this because exists various add-ons for this -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] best option to use users from Active Directory?
sorry, i forgot say I use Zope 2.11.1 2009/8/31 Miguel Beltran R. yourpa...@gmail.com I only need valid the password users from active directoy I ask this because exists various add-ons for this -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how get a relative root from
I resolve using this script [getmyroot_py] request = container.REQUEST if request.has_key(VirtualRootPhysicalPath): s= else: s=request.BASE2 return s [menu] dtml-let myroot=getmyroot_py ul id=nav li a href=dtml-myroot;/finanza/proyecto/Proyecto/a ul class=menu lia href=dtml-myroot;/finanza/proyecto/altaAlta/a/li lia href=dtml-myroot;/finanza/proyecto/busquedaBusqueda/a/li /ul /li /ul /dtml-let ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] how get a relative root from
Hi list how can do a script what return the relative parent from it self? I use virtual_hosting and because a configuration I need access to my site like http://mysite or http://192.168.1.1/mysite. The problem is I have a _menu_ with absolute path, working fine using http://mysite but not the other way My actual menu is like this: ul id=nav li a href=/finanza/proyecto/Proyecto/a ul class=menu lia href=/finanza/proyecto/altaAlta/a/li lia href=/finanza/proyecto/busquedaBusqueda/a/li /ul /li /ul and need when is loaded from http://192.168.1.1/mysite ul id=nav li a href=/mysite/finanza/proyecto/Proyecto/a ul class=menu lia href=/mysite/finanza/proyecto/altaAlta/a/li lia href=/mysite/finanza/proyecto/busquedaBusqueda/a/li /ul /li /ul can someone say me how do it? thanks -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how recover original context?
2009/7/14 Andreas Jung li...@zopyx.com On 15.07.09 01:14, Miguel Beltran R. wrote: Hi list I have the next tree root \-page1.htm \-scripts \-script1_py | \-folder1 \-folder1a \-ZPT1 \-zsql1 I trying made a request from PT1 to page1.htm page1.htm call to script1_py I want call from script1_py to zsql1 how can recover what context=folder1a? forget, while write this mail I have a idea [page1.htm] metal:block tal:content=structure python:conext.scripts.script1_py(context) /metal:block in script1_py declare a parameter mycontext what is folder1a http://www.mail-archive.com/zope@zope.org/msg31189.html -aj thanks for answer -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] how recover original context?
Hi list I have the next tree root \-page1.htm \-scripts \-script1_py | \-folder1 \-folder1a \-ZPT1 \-zsql1 I trying made a request from PT1 to page1.htm page1.htm call to script1_py I want call from script1_py to zsql1 how can recover what context=folder1a? forget, while write this mail I have a idea [page1.htm] metal:block tal:content=structure python:conext.scripts.script1_py(context) /metal:block in script1_py declare a parameter mycontext what is folder1a -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] is possible use request.set in a zpt?
It is possible... div tal:define=ignored python:request.set('sumVar', 0) but not recommended. The kind of logic you are trying to wedge into the template should be pushed out into a Python script, leaving the template only with the job of rendering the results. Tres. - -- I want show tabular data with money and the last show the sum can you explain me how can made better this then? almost never use python script :P Thanks ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] how detect a variable from template father?
Hi list I have 2 templates, in second template I need render a span only when the first template have defined a variable. template1: ul tal:define=var1 python:1 li tal:replace=structure conext/template2/li li tal:replace=structure python:conext.template2(var2=1)/li /ul template2: li input id=x name=x value=somevalue span tal:condition=exists: var1span2/span span tal:condition=exists: attr/var1span2/span span tal:condition=exists: context/var1span2/span span tal:condition=exists: container/var1span2/span span tal:condition=exists: options/var2span3/span /li any condition in span not work :( -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] external method
Zope is running as user scholarpack who is an administrator on win server 2008. / usar scholarpack have rights to access postgres? are you see the logs from postgres? new conecctions? or logs from zope? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] bug? pagetemplate using strftime
You can't use stftime. You have to manually build a string with the format you want using the other methods inside DateTime. e.g. fetcha.aCommonZ() or build up your date using components such as; fetcha.day() fetcha.month() fetcha.year() I made a script what recive a parameter fecha(f) script pFecha: s=%02d-%02d-%04d s=s % (f.day(),f.month(),f.year()) print s return printed the call is td tal:content=python: container/pFecha(item.fecha) Thanks ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] bug? pagetemplate using strftime
If you strftime to show the hour and minute too, you will see as I previously said it is showing you the time in UTC (as determined by how many hours is it out). I made a test with date 2009/05/07 using dtml-var fecha.timezone -- dmYzZ=dtml-var fecha fmt=%d/%m/%Y %z %Z -- c=dtml-var fecha fmt=%c -- xdtml-var fecha fmt=%x -- Xdtml-var fecha fmt=%X and show this bound )= 07= 05= 2009= datetime(= of= datetime.timezone= method= -- dmYzZ=06/05/2009 -- c=05/06/09 19:00:00 -- x05/06/09 -- X19:00:00/bound here I see what you said me, the hour is gmt-0500. If add in zope.conf environment TZ America/Mexico_City /environment or in runzope.bat @set TZ=America/Mexico_City nothing change, render the same what before add TZ now, how I can show the correct date? help please I use MS Sql Server 2000 with field smalldatetime I never used before timezone. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] bug? pagetemplate using strftime
'item.fetcha' is what kind of instance? DateTime? datetime? How to reproduce the behavior? We need something that works on any system. I don't know what type is. How can know? tr tal:repeat=item container/getData td tal:content=python: item.fecha.strftime('%d-%m-%Y');09-01-2009/td td tal:content=item/fecha2009/01/10/td /tr getData is a zsql method what connect to postgresql using zpsycopgda 2.0 conecction with enconding utf-8 serializable (with zope internal datetime option enabled and disabled) and not work :( This problem happen too with ms sql server 2000 with zpyodbc. Using %d break the day. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] bug? pagetemplate using strftime
Sorry, I not say clear where is the bug The original data is year 2009, month 01, day 10 2009/4/20 Miguel Beltran R. yourpa...@gmail.com Hi list, This is a bug in strftime? add to report to launchpad? tr tal:repeat=item container/getData td tal:content=python: item.fecha.strftime('%d-%m-%Y');09-01-2009/td Using strftime show day 09. Here is the error. td tal:content=item/fecha2009/01/10/td Here the day show correctly /tr can someone confirm this? using a database postgresql 8.3 zope 2.11.1 windows 2003 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] bug? pagetemplate using strftime
Hi list, This is a bug in strftime? add to report to launchpad? tr tal:repeat=item container/getData td tal:content=python: item.fecha.strftime('%d-%m-%Y');09-01-2009/td td tal:content=item/fecha2009/01/10/td /tr can someone confirm this? using a database postgresql 8.3 zope 2.11.1 windows 2003 Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ztp and dollars-and-cents
2009/1/15 Tres Seaver tsea...@palladion.com -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Miguel Beltran R. wrote: dtml-var have dollars-and-cents to made show numbers this way 0,000,000.00 exist something to do the same with zpt tal:content ? You can use the same function, because it is imported into a safe for import by untrusted code module (Products.PythonScripts.standard). E.g.: p tal:define=std modules/Products/PythonScripts/standard; tal:content=python: std.dollars_and_cents(value)1.00/p Thanks. I just modify to python: 'strong' + std.thousands_commas(std.dollars_and_cents(item.saldo))+ '/strong' and work excellent ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ztp and dollars-and-cents
dtml-var have dollars-and-cents to made show numbers this way 0,000,000.00 exist something to do the same with zpt tal:content ? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How manage error with zsql
Whenever you get exceptions, you should look at the error description in your error_log object (in the Zope Root Folder of the ZMI). There, you can see (in the so called traceback) where the exception has been raised. This is invaluable information. -- Dieter Thanks, another question is possible have a general except and inside show what type is? in dtml was dtml-try ... dtml-except type:dtml-var error_type value: dtml-var error_value /dtml-try -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How manage error with zsql
I trying the next, but not work say invalid syntax (Script (Python), line 11) 2008/12/6 robert rottermann [EMAIL PROTECTED] hi, I think you should write in a python script: try: result = context.insert_data.zsql msg = 'data inserted' except StandardError as e: -- error here msg = 'Error type %s. brValue: %s' % (e.type, e.value) return msg If change to try: result=context.proyecto_alta_zsql() msg=Se incertaron los datos correctamente except StandardError, (e1,e2): msg = Error valor %s y %s % (e1,e2) return msg say Tipo: Unauthorized Valor: You are not allowed to access 'a particular str' in this context (same error with type?) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How manage error with zsql
I tried to insert data using an zsql, insert fine How manage error with zsql. Before dtml-try dtml-call insert_data Data inserted!!! dtml-except Error type:dtml-var error_type Error type:dtml-var error_value /dtml-try Now (All files are ZPT) [index_html] ... form action=proyecto_alta.html input type=text name=field1 id=field1 / ... input type=text name=field2 id=field2 / /form [proyecto_alta.html] div tal:on-error=structure here/error_insertar tal:condition=context/insert_data.zsql tal:content=string: Data inserted!!! /div [error_insertar] error=_['error'] if error.type==ZeroDivisionError: return pCan't divide by zero./p else: return pAn error ocurred./p pError type: %s/p pError value: %s/p % (error.type, error.value) But say Tipo Unauthorized Valor You are not allowed to access 'type' in this context TraceBack 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 96, in pt_render - Module zope.pagetemplate.pagetemplate, line 115, in pt_render - Module zope.tal.talinterpreter, line 271, in __call__ - Module zope.tal.talinterpreter, line 346, in interpret - Module zope.tal.talinterpreter, line 981, in do_onError_tal - Module zope.tal.talinterpreter, line 346, in interpret - Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal - Module Products.PageTemplates.Expressions, line 199, in evaluateStructure - Module zope.tales.tales, line 696, in evaluate *URL: /ceed/finanza/proyecto/proyecto_alta.html* *Line 1, Column 0* *Expression: PathExpr standard:u'here/error_insertar'* *Names:* {'container': Folder at /ceed/finanza/proyecto, 'context': Folder at /ceed/finanza/proyecto, 'default': object object at 0x0075A528, 'here': Folder at /ceed/finanza/proyecto, 'loop': {}, 'nothing': None, 'options': {'args': ()}, 'repeat': Products.PageTemplates.Expressions.SafeMapping object at 0x02382828, 'request': HTTPRequest, URL=http://sic/finanza/proyecto/proyecto_alta.html, 'root': Application at , 'template': ZopePageTemplate at /ceed/finanza/proyecto/proyecto_alta.html, 'traverse_subpath': [], 'user': User 'admin'} - Module zope.tales.expressions, line 217, in __call__ - Module Products.PageTemplates.Expressions, line 139, in _eval - Module Products.PageTemplates.Expressions, line 91, in render - Module Products.PageTemplates.ZRPythonExpr, line 79, in call_with_ns - Module Shared.DC.Scripts.Bindings, line 327, in __render_with_namespace__ - Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec - Module Products.PythonScripts.PythonScript, line 327, in _exec - Module None, line 2, in error_insertar *PythonScript at /ceed/finanza/proyecto/error_insertar* *Line 2* Unauthorized: You are not allowed to access 'type' in this context (Example taked from http://www.plope.com/Books/2_7Edition/AppendixC.stx#2-28http://www.plope.com/Books/2_7Edition/AppendixC.stx#2-28 ) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] problem with ms sql server
Hi list I have a zsql where made a UPDATE and INSERT, I need know when happen a error to show. I using pyodbc 2.0.58, zpyodbcda 1.0.6 and ms sql server 2000 [zsql with error after render: actualiza_info ] SET XACT_ABORT ON BEGIN TRANSACTION UPDATE taller SET comercial = '' where taller = 1 insert into taller_movimiento (estado, taller, fecha, asunto, observacion ) values( '14', 1, '', --This must be not blank '', '' ) COMMIT TRANSACTION [dtml method] dtml-try dtml-call actualiza_info All Ok dtml-except Error, but not showed :( /dtml-if If I test the zsql show this, but must show the error: This statement returned no results. -- *SQL used:* SET XACT_ABORT ON BEGIN TRANSACTION UPDATE taller SET comercial = '' where taller = 1 insert into taller_movimiento (estado, taller, fecha, asunto, observacion ) values( '14', 1, '', '', '' ) COMMIT TRANSACTION -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Was Problem using nested dtml-in with zsql
The official message for newbies is likely: use ZPT. Andreas This is what missing in the first response My error was not say what I have with my system 4 years ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem using nested dtml-in with zsql
I resolve my problem modifying file C:\Zope\2.11.1\Zope\lib\python\DocumentTemplate\DT_InSV.py Method __getitem__ Changing if l 0: alt_prefix = self.alt_prefix if not (alt_prefix and key.startswith(alt_prefix)): raise KeyError, key suffix = key[len(alt_prefix):].replace('_', '-') if '-' in suffix: try: return self[suffix] except KeyError: pass prefix = 'sequence' key = 'sequence-' + suffix else: suffix=key[l+1:] prefix=key[:l] TO if l 0: alt_prefix = self.alt_prefix if not (alt_prefix and key.startswith(alt_prefix)): raise KeyError, key suffix = key[len(alt_prefix):].replace('_', '-', 1) changed to just one time replace #too my variable have a '_' and is bad replace #if '-' in suffix: -- what do it? the original suffix always have '-' #try: return self[suffix] #except KeyError: pass prefix = 'sequence' key = 'sequence-' + suffix try:return self[key] -- the difference with the return above is what suffix except KeyError: pass#have 'var-region_nombre and here is 'sequence-var-region_region' else: suffix=key[l+1:] prefix=key[:l] All work fine until now 2008/11/10 Miguel Beltran R. [EMAIL PROTECTED] The application is already designed with dtml. This is a little change. Before I rename it the fields in zsql to avoid conflicts. 2008/11/8 Andreas Jung [EMAIL PROTECTED] Any particular reason for using DTML instead of ZPT? DTML is dead. -aj On 06.11.2008 20:53 Uhr, Miguel Beltran R. wrote: Hi list After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried use two dtml-in for get information from zsql diferents, but say This resource may be trying to reference a nonexistent object or variable *'x_var_region'*. what is missing? The first dtml-in (prefix=q) only return one record. The second dtml-in return 12 records. [code] dtml-in expr=zsql_taller( zregi=bregi, ztall=btall) prefix=q p form class=formulario action=estado.html id=main_form name=main_form input type=hidden name=accion value=insertar / ul lilabel for=bregi class=tituloREGION/label select id=bregi name=bregi dtml-in dime_region prefix=x option value=dtml-var x_var_region --- Here try access tha variable dtml-if expr=x_var_region==q_var_regionselected/dtml-if /option /dtml-in /select /li /ul /form p /dtml-in -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK E-Publishing, Python, Zope Plone development, Consulting -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problem using nested dtml-in with zsql
The application is already designed with dtml. This is a little change. Before I rename it the fields in zsql to avoid conflicts. 2008/11/8 Andreas Jung [EMAIL PROTECTED] Any particular reason for using DTML instead of ZPT? DTML is dead. -aj On 06.11.2008 20:53 Uhr, Miguel Beltran R. wrote: Hi list After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried use two dtml-in for get information from zsql diferents, but say This resource may be trying to reference a nonexistent object or variable *'x_var_region'*. what is missing? The first dtml-in (prefix=q) only return one record. The second dtml-in return 12 records. [code] dtml-in expr=zsql_taller( zregi=bregi, ztall=btall) prefix=q p form class=formulario action=estado.html id=main_form name=main_form input type=hidden name=accion value=insertar / ul lilabel for=bregi class=tituloREGION/label select id=bregi name=bregi dtml-in dime_region prefix=x option value=dtml-var x_var_region --- Here try access tha variable dtml-if expr=x_var_region==q_var_regionselected/dtml-if /option /dtml-in /select /li /ul /form p /dtml-in -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK E-Publishing, Python, Zope Plone development, Consulting -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Convert query in tuple
can be saved a zsql query to tuple variable? exist something like this? dtml let t myquery().tuple how using scripts ? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Convert query in tuple
sorry I already founded http://plope.com/Books/2_7Edition/RelationalDatabases.stx#2-74 El 7 de noviembre de 2008 14:38, Miguel Beltran R. [EMAIL PROTECTED]escribió: can be saved a zsql query to tuple variable? exist something like this? dtml let t myquery().tuple how using scripts ? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Problem using nested dtml-in with zsql
Hi list After read http://plope.com/Books/2_7Edition/AppendixA.stx#2-19 I tried use two dtml-in for get information from zsql diferents, but say This resource may be trying to reference a nonexistent object or variable *'x_var_region'* . what is missing? The first dtml-in (prefix=q) only return one record. The second dtml-in return 12 records. [code] dtml-in expr=zsql_taller( zregi=bregi, ztall=btall) prefix=q p form class=formulario action=estado.html id=main_form name=main_form input type=hidden name=accion value=insertar / ul lilabel for=bregi class=tituloREGION/label select id=bregi name=bregi dtml-in dime_region prefix=x option value=dtml-var x_var_region--- Here try access tha variable dtml-if expr=x_var_region==q_var_regionselected/dtml-if /option /dtml-in /select /li /ul /form p /dtml-in -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] standard_error using zpt
Thanks Work now :D Just need remove the single cuotes ( ' ) 2008/11/3 Jeff Peterson [EMAIL PROTECTED] Try this: tal:attributes=id string:'tr_'${repeat/item/number} -- Jeffrey D Peterson Webmaster Crary Industries, Inc. *From:* Miguel Beltran R. [mailto:[EMAIL PROTECTED] *Sent:* Friday, October 31, 2008 8:01 PM *To:* Jeff Peterson *Subject:* Re: [Zope] standard_error using zpt Now is working fine After change /standard_error to /dir/standard_error_message made the I wanted. now the problem is tr id=tr tal:repeat=item context/zsql_producto tal:attributes=id python: 'tr_' + repeat['item'].number say cannot concatenate 'str' and 'instancemethod' objects 2008/10/31 Jeff Peterson [EMAIL PROTECTED] Yeah, I guess I wouldn't expect that to work. Do you have the full traceback? The standard_error_message template can be tricky. It doesn't get called to handle every error, nor should you call it directly, I think. AFAIK the options data is only available when an error, one that it handles by default, occurs. Also, and I may be wrong I haven't played with it too much but isn't the name standard_error_message required? I think what you want to look at is the Zope help for tal:on-error There is an example there that may help. -- Jeffrey D Peterson Webmaster Crary Industries, Inc. *From:* Miguel Beltran R. [mailto:[EMAIL PROTECTED] *Sent:* Thursday, October 30, 2008 9:43 PM *To:* Jeff Peterson *Cc:* Andrew Milton; zope@zope.org *Subject:* Re: [Zope] standard_error using zpt Not work :(, say Error Type: TraversalError Error Value: ({'args': ()}, 'error_type') : /a/b/muestra.pt div tal:condition=exists:request/modo tal:on-error=structure context/standard_error.pt p tal:condition=python:request.modo=='nada' tal:omit-tag= No se a ejecutado ninguna accion /p p tal:condition=python:request.modo=='ultimos' tal:content=structure container/muestra_ultimos.pt tal:omit-tag= /p /div : /a/b/muestra_ultimos.pt table border=1 thead tr thTipo/th thProducto/th thNombre/th thPresentacion/th thUnidad/th thExistencia/th thTotal/th thObservaciones/th tr /thead tbody tr id=tr tal:repeat=item context/zsql_producto tal:attributes=id python: 'tr_' + repeat.number --here is the error what I want catch (how resolve?) td tal:content=item/tipo_productoTipo/td /tr /tbody /table : /standard_error.pt table tr thTipo/th td tal:content=options/error_type TipoError/td thValor/th td tal:content=options/error_value ValorError/td th/th td tal:content=options/error_tb tb/td th/th td tal:content=options/error_traceback Raestro en reversa/td th/th td tal:content=options/error_messagemensaje de error/td th/th td tal:content=options/error_log_urlurl de error/td /tr /table 2008/10/30 Jeff Peterson [EMAIL PROTECTED] Just for independent confirmation he's right, options is what you want. -- Jeffrey D Peterson Webmaster Crary Industries, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Milton Sent: Wednesday, October 29, 2008 11:02 PM To: Miguel Beltran R. Cc: zope@zope.org Subject: Re: [Zope] standard_error using zpt +---[ Miguel Beltran R. ]-- | Hi List | | I remember what old versions from zope haved standard_error using DTML | How can do it the same using ZPT? | | I already try: | td tal:content=error/type | td tal:content=python: error.type | td tal:content=context/error/type From memory the following should be available; options/error_type options/error_value options/error_tb options/error_traceback options/error_message options/error_log_url -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] standard_error using zpt
Not work :(, say Error Type: TraversalError Error Value: ({'args': ()}, 'error_type') : /a/b/muestra.pt div tal:condition=exists:request/modo tal:on-error=structure context/standard_error.pt p tal:condition=python:request.modo=='nada' tal:omit-tag= No se a ejecutado ninguna accion /p p tal:condition=python:request.modo=='ultimos' tal:content=structure container/muestra_ultimos.pt tal:omit-tag= /p /div : /a/b/muestra_ultimos.pt table border=1 thead tr thTipo/th thProducto/th thNombre/th thPresentacion/th thUnidad/th thExistencia/th thTotal/th thObservaciones/th tr /thead tbody tr id=tr tal:repeat=item context/zsql_producto tal:attributes=id python: 'tr_' + repeat.number --here is the error what I want catch (how resolve?) td tal:content=item/tipo_productoTipo/td /tr /tbody /table : /standard_error.pt table tr thTipo/th td tal:content=options/error_type TipoError/td thValor/th td tal:content=options/error_value ValorError/td th/th td tal:content=options/error_tb tb/td th/th td tal:content=options/error_traceback Raestro en reversa/td th/th td tal:content=options/error_messagemensaje de error/td th/th td tal:content=options/error_log_urlurl de error/td /tr /table 2008/10/30 Jeff Peterson [EMAIL PROTECTED] Just for independent confirmation he's right, options is what you want. -- Jeffrey D Peterson Webmaster Crary Industries, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Milton Sent: Wednesday, October 29, 2008 11:02 PM To: Miguel Beltran R. Cc: zope@zope.org Subject: Re: [Zope] standard_error using zpt +---[ Miguel Beltran R. ]-- | Hi List | | I remember what old versions from zope haved standard_error using DTML | How can do it the same using ZPT? | | I already try: | td tal:content=error/type | td tal:content=python: error.type | td tal:content=context/error/type From memory the following should be available; options/error_type options/error_value options/error_tb options/error_traceback options/error_message options/error_log_url -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] standard_error using zpt
Hi List I remember what old versions from zope haved standard_error using DTML How can do it the same using ZPT? I already try: td tal:content=error/type td tal:content=python: error.type td tal:content=context/error/type Thanks -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: authentication with python program
#Martijn Yes, have role manager #Josef After change options and restart Z2.log: 10.28.1.18 - admin [18/Apr/2008:17:01:08 +0200] GET /Control_Panel/manage_main HTTP/1.1 200 8023 Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 10.28.1.18 - Anonymous [18/Apr/2008:17:01:18 +0200] POST /bitacoras/alta/estado2.html HTTP/1.1 200 692 Python-urllib/2.5 trace.log: B 36356824 2008-04-18T17:01:08 GET /Control_Panel/manage_main I 36356824 2008-04-18T17:01:08 0 A 36356824 2008-04-18T17:01:08 200 8023 E 36356824 2008-04-18T17:01:08 B 36356864 2008-04-18T17:01:18 POST /bitacoras/alta/estado2.html I 36356864 2008-04-18T17:01:18 434 A 36356864 2008-04-18T17:01:18 200 692 E 36356864 2008-04-18T17:01:18 error_log: nothing?? 2008/4/18, Josef Meile [EMAIL PROTECTED]: Hi Miguel First, you could drop the Unauthorized Exception from the error_log object in the root folder of the zope management interface. Then activate the verbose-security option in your zope.conf file. To do this, you need to put/replace this lines: security-policy-implementation python verbose-security on After you have done this, you need to restart zope, try again your authentication script, and take a look at your event.log file or the error_log object. You may find the reason of why is this failing. In case you don't find it, then place the full traceback here. Best regards Josef Miguel Beltran R. schrieb: I have this program what open a dtml what return a XML page, but I have error with permisions: import urllib, urllib2 pagina = http://10.28.1.239/bitacoras/alta/estado2.html; datos = {btipo:D, bholo:87654321, bplac:dd-12345, accion:alta_gasolina, } params=urllib.urlencode(datos) aut=urllib2.HTTPBasicAuthHandler() aut.add_password(AFICON, pagina, myuser, mypass) opener=urllib2.build_opener(aut) urllib2.install_opener(opener) r=urllib2.urlopen(pagina,params) print r.read() r.close() but returned XML say: ajax accionalta_gasolina/accion respuestaerror/respuesta error_typeUnauthorized/error_type error_descriptionYou are not allowed to access 'zsql_alta' in this context/error_description /ajax help? how I can send HTTPBasicAuth? pd. Sorry by my bad english ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: authentication with python program
Using web browser work fine. Using wireshark I see what my python program not send WWW-Authentification. Now I going to python list. But if someone know how can tell me please 2008/4/18, Martijn Jacobs [EMAIL PROTECTED]: Miguel Beltran R. wrote: #Martijn Yes, have role manager What if you login with the user with your webbrowser instead of your python program? -- Martijn Jacobs Four Digits, Internet Solutions a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw: 8161.22.234.B01 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: authentication with python program
Yes please and thakns to every body 2008/4/18, Martijn Jacobs [EMAIL PROTECTED]: I have a very old python script which does want you want, I can send it to you if you like. Martijn Using web browser work fine. Using wireshark I see what my python program not send WWW-Authentification. Now I going to python list. But if someone know how can tell me please 2008/4/18, Martijn Jacobs [EMAIL PROTECTED]: Miguel Beltran R. wrote: #Martijn Yes, have role manager What if you login with the user with your webbrowser instead of your python program? -- Martijn Jacobs Four Digits, Internet Solutions a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw: 8161.22.234.B01 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 -- Martijn Jacobs Four Digits, Internet Solutions a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw: 8161.22.234.B01 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] authentication with python program
I have this program what open a dtml what return a XML page, but I have error with permisions: import urllib, urllib2 pagina = http://10.28.1.239/bitacoras/alta/estado2.html; datos = {btipo:D, bholo:87654321, bplac:dd-12345, accion:alta_gasolina, } params=urllib.urlencode(datos) aut=urllib2.HTTPBasicAuthHandler() aut.add_password(AFICON, pagina, myuser, mypass) opener=urllib2.build_opener(aut) urllib2.install_opener(opener) r=urllib2.urlopen(pagina,params) print r.read() r.close() but returned XML say: ajax accionalta_gasolina/accion respuestaerror/respuesta error_typeUnauthorized/error_type error_descriptionYou are not allowed to access 'zsql_alta' in this context/error_description /ajax help? how I can send HTTPBasicAuth? pd. Sorry by my bad english -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )