Re: [Zope] Iterating over objects in ZODB
obj.body() On 13 May 2015, Niels Dettenbach n...@syndicat.com wrote: Am Mittwoch, 13. Mai 2015, 11:36:03 schrieb Rich Harley: is returned. How can I access the actual contents of the Python Script? The python script object seems a bit more complex then a DTML-Method object - means you have to access the script content of the python script object directly (not shure if it's params and body - have to look into Zope help (PythonScript.py) or Zope sources for the exact field). regarduing the object docs it shoudl work with .read() directly (if it IS a PythonScript object) or document_src: def read(): Return the body of the Python Script, with a special comment block prepended. This block contains meta-data in the form of comment lines as expected by the 'write' method. def document_src(REQUEST=None, RESPONSE=None): Return the text of the 'read' method, with content type 'text/plain' set on the RESPONSE. hth a bit and works, Niels. -- --- Niels Dettenbach Syndicat IT Internet http://www.syndicat.com PGP: https://syndicat.com/pub_key.asc --- ___ 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 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] Zopache = ZTK + Grok + ZMI
On 07/31/2014 06:33 AM, Christopher Lozinski wrote: On 7/30/14, 10:50 PM, Fernando Martins wrote: I don't know about ZTK, Grok. ... Okay so that tells you what ZTK and Grok are. Back to your application. I never needed it directly and I wonder if it was not a case of over-engineering that helped zope's community fragmentation. I don't know why grok did not succeed. On 7/30/14, 10:50 PM, Fernando Martins wrote: (I use my own security roles in the database) . Well that is very interesting. One of my biggest complaints about Zope 2 was the security model. Security was on the instances. Not possible to just make security declarations on the classes, without having to also declare it on the instances. So I am hugely curious about your security model.The grok security model, while better than ZTK, still leaves a lot to be desired. Fortunately it is quite easy to replace. it's just an application specific security model. some pages (or parts of it) are merely for admin roles (which have a group of people associated). In other cases, it is the data (records, which belong to the creator, or corresponding team, or related maintainers. Has it happens, the roles are part of the data of the application and naturally used to manage the data or pages or parts of it. For the pages, it is hard-coded. Each page has associated a single Python script (business rules) that produces all data as a single class which includes attributes like isAdmin, isEditor. Nothing general purpose. On 7/30/14, 10:50 PM, Fernando Martins wrote: although most likely my application will have to be ported to tomcat (using jython) in the short term. Why tomcat? I would think that there would be many native python web servers you could use. Have you considered Pyramid. It also uses the ZODB and traversal. politics. it is supported by IT. zope is not. nothing wrong with zope itself. ___ 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] Zopache = ZTK + Grok + ZMI
On 07/30/2014 12:56 PM, Christopher Lozinski wrote: I have a basic version of Zopache running internally. It is a zope-2 like ZMI running on top of grok on top of ZTK. ZTK is really very nicely written. Grok makes it so much easier to use the ZTK. I an focused on using it to build my next generation recruiting website, but it would be good to have someone to talk to about this stuff. It is very very hard to find anyone who both appreciates TTW development, and understands the multiple layers of ZTK and Grok. I am a quite happy user of zope 2.9.x, although most likely my application will have to be ported to tomcat (using jython) in the short term. I keep data in MySQL, I had to replace most products with Extensions for lack of support, didn't use the TTW classes. I use little of the zope API and no roles (I use my own security roles in the database) . I like the ZMI, error_log, Zope DB Adapter, ZSQL, and Python Scripts which hide the web machinery from me. I like the easy access to the running environment for testing and maintenance purposes. I love the ZPT and Python. I have a nice UI/BusinessRules/DataAccess architecture that makes it easy to do maintenance at minimal cost. It is very easy to jump in and fix/improve code, especially considering I only do it on occasion. There are of course limitations to this environment, in particular for developers that need all the file system tools for development and collaboration. But has it stands, it is very cost effective for some use cases. I don't know about ZTK, Grok. Fernando Martins Anyhow if you are curious I am clozinski on skype. Regards Chris ___ 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 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)
On 02/06/2012 04:59 PM, Hugo Ramos wrote: Is there any tool I can use to convert all objects in my data.fs to utf-8? I had unicode related problems which usually come from mixing different encodings. In my case pretty much all my data also comes from a relational database. Also, not all versions of Zope support unicode properly for all types of objects. I had problems trying to upgrade my data.fs between zope versions due to unicode issues. I don't recall all the situations I came through and I can't help you much more here. So, I guess your issue is that your page templates are combining data from other zope objects which are in different encoding. I doubt that you can convert all your objects to the same encoding as a general rule because that will be dependent on the specific object implementation. Even if you convert the data part of the objects, the code might still not work properly. But I don't know which type of objects you are talking about. Maybe one approach would be to export your data.fs as a whole or in parts using XML format and then try to make sure its encoding is utf-8. Just vague considerations and a long shot, sorry if it doesn't help. Regards, Fernando ___ 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] Help in deciding approach to Web App
On Dec 5, 2011 09:48 John Schinnerer j...@eco-living.net wrote: On 12/04/2011 09:56 PM, Fernando Martins wrote: On 12/04/2011 09:31 PM, John Schinnerer wrote: In any case, this looks (to me anyhow) like a very object-oriented system you are modeling so an object oriented approach and language would seem most suitable. And how would you create (and update) objects in Python for: at least 500 tools as of now, and it is bound to grow in the future as newer tools are introduced. Existing tools will also have version updates. Each tool, on average, has at least 100 properties that define the tool. Some of them have as high as 1000 unique properties. How familiar are you with OOP? I think you are confusing me with the OP. And you did not answer my question. Are you recommending that a programmer codes all these objects by hand in Python? The know-how of what constitutes a tool, their properties and even the tool selection criteria is not developer know-how. Therefore, this information should be defined outside the program in way that the tool expert(s) can manage it. Which leads us to some storage solution, an RDB being the most common. Since, as I pointed out before, SQL most likely would not be able to do the tool selection alone, Python would merely load the data from the external source and create objects and expertise on the fly. Anyway, I agree with you that the main issue does not seem to be the web publishing solution, but rather how to represent the tool information and how to do tool selection, which is off-topic. Regards, Fernando ___ 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] Help in deciding approach to Web App
On Dec 5, 2011 10:25 Niels Dettenbach n...@syndicat.com wrote: From my experience developing within Zope / ZODB (with Python, DTML and/or ZPT) allows very high quality products within very short timeframes and even further maintaining the project is relative ressource efficient - especially compared to PHP. How would you put 500+ objects (for the tools) each with hundreds or thousands of attributes in in ZODB? Regards, Fernando ___ 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] Fwd: Re: Re: Help in deciding approach to Web App
On Dec 5, 2011 14:38 Niels Dettenbach n...@syndicat.com wrote: Am Montag, 5. Dezember 2011, 14:23:57 schrieben Sie: How would you put 500+ objects (for the tools) each with hundreds or thousands of attributes in in ZODB? This depends from the object structure and transforms to do with it, but - as i wrote - it could make sense to use different database solutions in parallel for the same application and/or different parts of the same data objects. I was asking about tools and technology, not about object design. Would you develop a Zope Product (or set of Products) or is there a different approach. The Zope book tells us nothing about creating custom objects in ZODB. Assuming a simple case of a web form to input a set of fixed attributes to define a tool object in ZODB, what is the simplest approach to create/update an object in ZODB? Putting 500+ data objects with very different and changing structures into a RDBMS could be a much larger mess... I agree, that's why I mentioned in my first post that this is not a typical Books and Authors data model. In a case like this, without more requirements information, I would say a table to define tools only with common attributes, another table to define relationships between tools, another table to list all possible attribute names and another one to define the specific attribute values for the tools. But this discussion is off-topic and even irrelevant with so little specification. Regards, Fernando ___ 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 Digest, Vol 91, Issue 2
On 12/05/2011 03:12 PM, Sareesh Sudhakaran wrote: Hi John and Fernando Intuitively I feel that my project fits in with an Object DB, which is why I have spent a lot of time trying to understand its methodology. But now I'm more confused than ever. Sareesh, could you be more specific about what confuses you? You have several routes, you need to give proper consideration to those routes. Maybe it would also help us if you clarify what is your skillset and experience in software development. Also, is your problem a CIM one? see http://en.wikipedia.org/wiki/Computer-integrated_manufacturing and specifically the key challenge listed over there. I have the impression you might be underestimating the problem. Finally, do you already have information about the tools in some electronic format? And what about the rules to choose tools? Is there already some computer based solution to help with the current problem? Please keep in mind that OOP and Object DB is not the same thing. You can work with objects in Python and never rely on OODB. I have serious doubts about using ZODB at your stage because AFAIK, creating custom objects requires the development of zope Products. Note that the zope book does not teach you about creating custom objects in the ZODB. You need another whole book for that. And the combination RDB and ZODB suggested by Neils/John seems too complicated as a start. I think you have a high learning curve ahead of you if have to learn to create Zope Packages to put objects in ZODB. But maybe there are simpler ways that I am not aware of. I'm sure OOP in Python and RDB is a good option. ZODB itself, I'm not so sure. Maybe others can enlighten you better here. It appears to me you don't have much experience and it looks like there is a long evolutionary project ahead of you. For these reasons, I would highly recommend Python. BTW, I never recommended and I do not recommend C/C++ for your needs, I just mentioned that I used it for a similar purpose many years ago. I would recommend you to do some programming in Python just to read some tool data from a text file, create some objects and try to do some tool selection where the output is merely done with print. Then you can upgrade to use MySQL to store your tool data and then you can decide if you go the Zope or the PHP route. Keep in mind that RDBs are a huge standard with many people and tools around it, whereas ZODB is very much a small niche in comparison. That should also weigh in your criteria. Regards, Fernando ___ 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] Help in deciding approach to Web App
Script - (some) ZSQL Methods - MySQL database might be a good starting point. You should not need to spend much time to implement a prototype using this approach. In the worse case scenario it helps you understand better your problem and what could be a better approach with little investment. Essentially you try the classical approach and if it does not work well, either you are doing something wrong, or you have a better understanding of your needs and where to go. Good luck, Fernando ___ 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] Help in deciding approach to Web App
On 12/04/2011 05:15 PM, Sareesh Sudhakaran wrote: As you mentioned, if I have to use mySQL, isn't it better for me to go with PHP+mySQL - easier to learn and deploy? Can I just start out with a framework like Symphony instead? Well, if all you have is PHP + MySQL in your provider, there is no which is better question, is it? You might want to look at http://phptal.org/ a library that provides a templating system similar to ZPT. The advantage is the better separation between presentation and business layers. Regards, Fernando ___ 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] Help in deciding approach to Web App
On 12/04/2011 09:31 PM, John Schinnerer wrote: In any case, this looks (to me anyhow) like a very object-oriented system you are modeling so an object oriented approach and language would seem most suitable. And how would you create (and update) objects in Python for: at least 500 tools as of now, and it is bound to grow in the future as newer tools are introduced. Existing tools will also have version updates. Each tool, on average, has at least 100 properties that define the tool. Some of them have as high as 1000 unique properties. Regards, Fernando ___ 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] REST webservice on Zope 2
I don't have specific experience with REST, but I return json using Python scripts and XML is page templates are supported. So, at least the basics are possible, if you need more automatic generation from Python objects I don't see why it would not work but I have no idea if it exists a library for that in zope2. Fernando On 09/14/2011 12:59 PM, Vimal wrote: Hi all, We need to implement a webservice for our Zope 2 website. Among SOAP and REST, REST appears to be easier to implement for what we need - return json or xml based on the URLs accessed. Zope 3 supports REST (z3c.rest) but not Zope 2. Does somebody have experience implementing REST on Zope 2? Regards, Vimal ___ 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 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] Upgrading from 2.10 to 2.13
On 09/02/2011 11:12 PM, Michael Shulman wrote: Second, it took some more work to uncover that I had to separately install the ZSQLMethods product. Michael, I can't help you with your issue but I got stuck in the upgrade since I didn't manage to install the ZSQLMethods. Can you tell which procedure did you follow? Regards, Fernando ___ 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] Unused options for buildout: 'eggs'.
On 07/15/2011 09:28 AM, Chris Withers wrote: On 09/07/2011 00:21, Fernando Martins wrote: I installed zope 2.13.8 per instructions on http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html Which bit? Well, as a general feedback, the documentation needs some sorting out: the install page linked from the downloads http://docs.zope.org/zope2/releases/2.13/INSTALL.html recommends virtualenv, which was my first attempt. I ignored a link there for buildout because buildout meant nothing to me. Then someone recommended buildout as the mainstream (not mentioned in the docs as the recommended practice) and I went to: http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html where I followed the first procedure there which is the standalone Zope with buildout. None of these worked for me to install ZSQL Methods. I am able to install the egg in zopepy, but then Zope does not recognise the Product. Some configuration is needed in Zope I guess, which I have not figured out yet. The main issue is the Shared.DC.ZRDB code, which is node a Product in itself. I can install other (simpler) Products. The last option, Creating a buildout-based Zope instance leads to full mixing code with data which doesn't appeal me much, but feedback like yours is pushing in this direction. I have come across a problem though. My server is not connected to the Internet and I need to use buildout in offline mode, as indicated here: http://www.buildout.org/docs/tutorial.html What would be the most effective way to prepare an offline set of eggs, without missing eggs? Using buildout in a connected computer and then copy the eggs from there I guess? And what about recipes? I will not be able to work on this for the next two weeks, but I would still appreciate feedback on offline installation and if possible how to setup Shared.DC.ZRDB in a standalone Zope setup. Fernando eggs is a key of the [instance] section, not the [buildout] section. Yeah, I was just following wrong or misleading instructions somewhere :( Cheers, Fernando ___ 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] Unused options for buildout: 'eggs'.
Hi, I installed zope 2.13.8 per instructions on http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html I created an instance outside the main Zope folder. Then I followed the instructions on http://plone.org/documentation/kb/add-ons/installing to try install ZSQLMethods: Egg-based packages are very simple to install with Buildout. [buildout] ... eggs = Products.ZSQLMethods and run bin/buildout. I get the message: Unused options for buildout: 'eggs'. I read somewhere that I need a recipe but I can't find such thing neither is it clear where to put it inside buildout.cfg. Can someone enlighten me here, please? Frankly, I miss the old drop-in Products folder. There might be advantages with the new system(s), but simplicity is lost and no documentation seems available. Regards, Fernando ___ 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 it possible to upgrade from 2.9 to 2.13?
I can not tell for sure if the problem was that one of the aliases mentioned by Tres Seaver in results.py. However, I had a simple application displaying merely one page and involving a few tables and maybe 10 queries, and 2.10 could not even take hundreds of hits. I made a simple Python program to hit the web site on the same page and randomly changing the parameters. In my experience, if you cook up some simple testing like this you'll quickly see the leak (I was using top in Linux). On Jul 4, 2011 10:24 Richard Harley rich...@scholarpack.com rich...@scholarpack.com wrote: Does anyone have any further information on this bug in 2.10 regarding ZSQL methods? Would an upgrade from 2.9 to 2.10+ in an app using lots of zsql methods cause unforseen issues? On 04/07/11 09:46, Stefan Loidl wrote: Hi Fernando, the option 'enable-product-installation' in zope.conf has to be set to on to enable product registration of old products in the Products directory. Regards, Stefan Am 03.07.2011 18:44, schrieb Fernando Martins: On 07/03/2011 09:30 AM, Fernando Martins wrote: merely dropping Products in the site-packages does not add a product. Browsing through the list I saw this post: https://mail.zope.org/pipermail/zope/2011-June/176165.html with reference to a directive in zope.conf: products /usr/local/Products.CMFCore-2.2.4/ I tried it with the package Products.ZSQLMethods here: http://pypi.python.org/pypi/Products.ZSQLMethods but no product is added and I see no error messages. The README.txt is not helpful and I found nothing useful in zope docs. In despair, I tried python setup.py build/install and all I got is a lot of zope packages being downloaded and dumped into the python install. Could someone be so kind to tell me the procedure to install Products from pypi? Is it possible to do it also with old products not in pypi? Also, what is the difference between zope.xxx and Products.xxx packages? Regards, Fernando ___ 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 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 it possible to upgrade from 2.9 to 2.13?
Stefan, thanks for your reply. In the meanwhile I was indeed able to put products in INSTANCE/Products (Zope 2.13.8). I did not know about that option you mention and I cannot check it now, but the Products from pypi were being recognised, as long as I put only the specific Product subfolder (not the whole pypi package which contains cruft for eggs, whatever else, I still don't fully understand). However, with ZSQL Methods, the situation is different. It contains the specific ZSQL Methods folder, but also Shared/DC/ZRDB. When loading, Zope complains it can't find the module ZRDB/Search.py (or something like that). So, ZSQLMethods depends on Shared, but Share is not being recognised (or at least not yet processed before ZSQL). How can I fix this? Somehow I guess the pypi package should be made an egg and dropped in lib/python2.6, and somehow configured. I couldn't yet find instructions on doing this for Zope. I've been trying to read about this whole new procedure[s] (setup tools, buildout, eggs, virtualenv, ???), but I have the impression the situation has been changing and it's quite hard to figure out what makes sense or works right now. Fernando On Jul 4, 2011 09:46 Stefan Loidl stefan.lo...@lrz.de stefan.lo...@lrz.de wrote: Hi Fernando, the option 'enable-product-installation' in zope.conf has to be set to on to enable product registration of old products in the Products directory. Regards, Stefan Am 03.07.2011 18:44, schrieb Fernando Martins: On 07/03/2011 09:30 AM, Fernando Martins wrote: merely dropping Products in the site-packages does not add a product. Browsing through the list I saw this post: https://mail.zope.org/pipermail/zope/2011-June/176165.html with reference to a directive in zope.conf: products /usr/local/Products.CMFCore-2.2.4/ I tried it with the package Products.ZSQLMethods here: http://pypi.python.org/pypi/Products.ZSQLMethods but no product is added and I see no error messages. The README.txt is not helpful and I found nothing useful in zope docs. In despair, I tried python setup.py build/install and all I got is a lot of zope packages being downloaded and dumped into the python install. Could someone be so kind to tell me the procedure to install Products from pypi? Is it possible to do it also with old products not in pypi? Also, what is the difference between zope.xxx and Products.xxx packages? Regards, Fernando ___ 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 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 it possible to upgrade from 2.9 to 2.13?
On Jul 4, 2011 13:30 Laurence Rowe l...@lrowe.co.uk l...@lrowe.co.uk wrote: I suggest using http://pypi.python.org/pypi/plone.recipe.zope2instance (it is not Plone specific) and referring to the Plone documentation for installing add-ons: http://plone.org/documentation/kb/add-ons/installing Thanks Lawrence, I have already a zope 2.13.7 installation following the instructions and using virtualenv. This seems to be an alternative to the buildout system explained in those links. There are several options in the add-ons page and I don't feel confident it really applies to my case: 1) what is the ZSQLMethods package in pypi? http://pypi.python.org/pypi/Products.ZSQLMethods/2.13.4. It's a zip with some egg-info stuff in there but it is not clear that it really is an egg (no .egg extension) 2) is Buildout compatible with virtualenv? The option to install an Egg without Buildout is not recommended over there. Fernando ___ 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] is it possible to upgrade from 2.9 to 2.13?
[resending as original seems to have got lost] I got stuck with 2.9.9 because 2.10 introduced a major leakage in the ZSQL Methods. Now the number of users in my web site have increased and other leakages have become also major issue (e.g., PageTemplates.Expressions.SubPathExpr). I was considering a major upgrade to 2.12 or 2.13 and I was trying 2.13.8. However, how can I install products?? It states in 2.12 What's new that they are still working but in fact merely dropping Products in the site-packages does not add a product. Regards, Fernando ___ 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 it possible to upgrade from 2.9 to 2.13?
On 07/03/2011 09:30 AM, Fernando Martins wrote: merely dropping Products in the site-packages does not add a product. Browsing through the list I saw this post: https://mail.zope.org/pipermail/zope/2011-June/176165.html with reference to a directive in zope.conf: products /usr/local/Products.CMFCore-2.2.4/ I tried it with the package Products.ZSQLMethods here: http://pypi.python.org/pypi/Products.ZSQLMethods but no product is added and I see no error messages. The README.txt is not helpful and I found nothing useful in zope docs. In despair, I tried python setup.py build/install and all I got is a lot of zope packages being downloaded and dumped into the python install. Could someone be so kind to tell me the procedure to install Products from pypi? Is it possible to do it also with old products not in pypi? Also, what is the difference between zope.xxx and Products.xxx packages? Regards, Fernando ___ 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] about the leakage in Shared.DC.ZRDB.Results.Results
Regarding the leakage in Shared.DC.ZRDB.Results.Results mentioned in: https://mail.zope.org/pipermail/zope/2011-January/176106.html which might very well be the leakage introduced in 2.10 that made ZSQL methods useless, what are the chances of being solved? I see that Tres Seaver made a new package, SQL Adaptor (not useful to me) because of this bug. Is it an indication the bug is too hard to fix? Fernando ___ 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-dev] zopeproject generated zope3 app and mod_wsgi
Hello there, First off all, I don't have a blog so I'll be posting it here. Yesterday I decided to setup a zopeproject generated app with mod_wsgi and I would like to share my experience. I am going to skip the part of setting up mod_wsgi with apache because I think this very well documented. My environment: zopeproject generated app sitting at: /opt/zope3/app using python located at: /usr/local buildout-eggs located at: /opt/buildout-eggs For testing purposes, I've added www.foo.com to my /etc/hosts so when I tried to reach www.foo.com it would resolve to my local machine. Then we have virtual hosting config (www.foo.com.config in my test case) : WSGIRestrictStdout Off WSGIPythonHome /usr/local WSGIDaemonProcess foo user=fcorrea group=users threads=1 maximum-requests=1 python-path=/opt/buildout-eggs/ VirtualHost *:80 ServerName www.foo.com WSGIScriptAlias /site /opt/zope3/app/bin/zope3.wsgi WSGIProcessGroup foo WSGIPassAuthorization On WSGIReloadMechanism Process SetEnv HTTP_X_VHM_HOST http://www.foo.com/site SetEnv PASTE_CONFIG /opt/zope3/app/deploy.ini /VirtualHost I created this file based on the one that Carlos de la Guardia created for grok and did some minor changes to make it work for zope3. Things I needed to do: Add the WSGIRestrictStdout Off directive because for some reason zope was trying to write something to sys.stdout and mod_wsgi didn't let it do it. Modify WSGIPythonHome and pointed to my custom python installation Modify WSGIDaemonProcess and set python-path to my buildout-eggs directory It turns out that zopeproject doesn't generate a .wsgi file for you so you need to create one and it need to look like this: (zope3.wsgi file based on the one repoze.grok generates) import os, sys sys.path.append('/opt/zope3/app/src') from paste.deploy import loadapp ini = '/opt/zope3/app/deploy.ini' application = loadapp('config:%s' % ini) Well, at this point I thought I was good to go and figured that something was still missing. After getting IOErros with zope trying to write logs to /home/fcorrea/logs/z3.log instead of /opt/zope3/app/log/z3.log, I rushed to repoze IRC channel and asked for help since they are leading zope on wsgi stuff. Chris McDonough again provided some guidance on trying to debug and asked me to change the user and check if zope would try to write the logs into that user's home directory and he was right. That pointed me out that I needed to hardcode the z3.log and Data.fs paths in my /opt/zope3/app/zope.conf so it would look like this: logfile path /opt/zope3/app/log/z3.log formatter zope.exceptions.log.Formatter /logfile Instead of the defaults generated by zopeproject that looks like this: logfile path log/z3.log formatter zope.exceptions.log.Formatter /logfile After changing the paths I thought I was going to see my nice app's front page in there but there was one more error in apache's log related to apidoc. [Thu Aug 28 12:06:13 2008] [error] [client 127.0.0.2] ZopeXMLConfigurationError: File /opt/zope3/app/apidoc.zcml, line 3.2-3.60 [Thu Aug 28 12:06:13 2008] [error] [client 127.0.0.2] ConfigurationError: ('Invalid value for', 'package', 'ImportError: Module zope.app has no global preference') For some reason, apidoc didn't work with my mod_wsgi setup..but heck, I was going production with the website so who cares about apidoc right now anyway? So that's what I did. Went back to my /opt/zope3/app/site.zcml and commented out the apidoc snippet, which recommends you to turn it off when going production BTW. So that's it. It is working now and it took me about 1.5h to get it going and I still don't know if I did it correctly. Does anyone have any feedback on this? Anyone running plain zope3 with mod_wsgi? I would be interested in feedback on how to improve this. Best Regards, Fernando ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] idiotic dreamweaver question
2006/9/20, David Bear [EMAIL PROTECTED]: Sorry to bug this list with a dw question. However, I was using DAVin dw and found that dw is unable to handle file extensions like .pt,.zpt, _html , etc.Does anyone else use dreamweaver to edit zope/plone files? If so, how do you make dreamweaver edit this types of files? I know _html, .pt,.zpt etc are well formed xhtml -- but I don't know how to tell stupiddw to edit them since it uses the extension to recognize file type. Edit the file Extensions.txt in Dreamweaver's Configuration folder (you have to edit the one inside your profile folder).The syntax is simple.-- Luiz Fernando B. Ribeiro ___ 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] Change the encoding of a single ZPT page
2006/8/31, Andreas Jung [EMAIL PROTECTED]: --On 31. August 2006 19:28:54 +0200 Dieter Maurer [EMAIL PROTECTED]wrote: Luiz Fernando Bernardes Ribeiro wrote at 2006-8-30 14:08 -0300: 2006/8/29, Andreas Jung [EMAIL PROTECTED]: ... After trying a lot of things, I found the problem is really in the zpublisher realm, no matter what kind of encoding trick I use, even with a python script, the output is converted to the default encoding if I use any variable or dynamic value from the database. If you were right (which I still hope you won't) than someone severely misunderstood the meaning of default.I think he is not right.-ajZope did respect the default setting when I changed the charset header in the file. The lesson learned is: Working with two encoding charsets is very trick, and even trickier if you use the ZMI to edit files. I had to create a simple ZPT file with the initial XML block and inject the rest of the xml data, including variables and database, using a tal:content pointing to a python script encoding everything to utf-8. The ZPT file was needed as simple way to change the charset header trough the ZMI.When you change the charset trough the ZMI Zope trows an exception if it find any non-conforming character, the problem is that since the default charset is set to iso Zope reencodes my file to iso when it generates the editing form field so when I submit it back Zope raises an exception. Considering I can't change everything to utf-8 I will have to live with it and maybe find a simpler pattern to change the charset without raising an exception (maybe the dummy tal:define?).I hope it help others. Thanks for your help and time, -- Luiz Fernando B. Ribeiro ___ 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] Change the encoding of a single ZPT page
2006/8/29, Andreas Jung [EMAIL PROTECTED]: --On 29. August 2006 12:28:30 -0300 Luiz Fernando Bernardes Ribeiro[EMAIL PROTECTED] wrote: Hello all, Is it possible to change the encoding of a page without having to change the default-zpublisher-encoding option in zope.conf? My default encoding is iso8859-1 but we have to generate some XML files to a flash app, but flash only accept utf-8. If you edit your ZPTs through the ZMI you might set the manage_page_charsetto utf-8. If the content-type of your ZPT is set to text/xml then theZPublisher should auto-detect the encoding from the XML preamble. The setting in zope.conf is just a fallback (at least in Zope 2.9+).-ajAfter trying a lot of things, I found the problem is really in the zpublisher realm, no matter what kind of encoding trick I use, even with a python script, the output is converted to the default encoding if I use any variable or dynamic value from the database. Changing the 'default-zpublisher-encoding' setting solved the problem but I would have to convert hundreds of iso8859-1 html pages... I have already recoded the XML inside a Python script where I think it will be easier to use any magic zope trick... so I'm asking a way to avoid changing zope.conf to produce this simgle xml file...Python script test.xml:request = container.REQUESTxml = [ ] xml.append('?xml version=1.0 encoding=utf-8?') xml.append('lista xmlns:metal=http://xml.zope.org/namespaces/metal xmlns:tal= http://xml.zope.org/namespaces/tal')xml.append('item palavra=%s id=%s /' % ( container.sqlPalavras(ID=id)[0].Apelido, id)) xml.append('/lista') print unicode(\n.join(xml), 'iso8859-1')return printed I'm using Zope 2.9.Thanks in advance for your help and time,-- Luiz Fernando B. Ribeiro ___ 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] Change the encoding of a single ZPT page
2006/8/30, Luiz Fernando Bernardes Ribeiro [EMAIL PROTECTED]: 2006/8/29, Andreas Jung [EMAIL PROTECTED]: --On 29. August 2006 12:28:30 -0300 Luiz Fernando Bernardes Ribeiro[EMAIL PROTECTED] wrote: Hello all, Is it possible to change the encoding of a page without having to change the default-zpublisher-encoding option in zope.conf? My default encoding is iso8859-1 but we have to generate some XML files to a flash app, but flash only accept utf-8. If you edit your ZPTs through the ZMI you might set the manage_page_charsetto utf-8. If the content-type of your ZPT is set to text/xml then theZPublisher should auto-detect the encoding from the XML preamble. The setting in zope.conf is just a fallback (at least in Zope 2.9+).-ajAfter trying a lot of things, I found the problem is really in the zpublisher realm, no matter what kind of encoding trick I use, even with a python script, the output is converted to the default encoding if I use any variable or dynamic value from the database. Changing the 'default-zpublisher-encoding' setting solved the problem but I would have to convert hundreds of iso8859-1 html pages... I have already recoded the XML inside a Python script where I think it will be easier to use any magic zope trick... so I'm asking a way to avoid changing zope.conf to produce this simgle xml file...Python script test.xml:request = container.REQUESTxml = [ ] xml.append('?xml version=1.0 encoding=utf-8?') xml.append('lista xmlns:metal=http://xml.zope.org/namespaces/metal xmlns:tal= http://xml.zope.org/namespaces/tal')xml.append('item palavra=%s id=%s /' % ( container.sqlPalavras(ID=id)[0].Apelido, id)) xml.append('/lista') print unicode(\n.join(xml), 'iso8859-1')return printed I'm using Zope 2.9.Thanks in advance for your help and time,-- Luiz Fernando B. Ribeiro Solved!! Using curl I found the problem was really the HTTP headers and the solution was always there in my face, in ZMI change the Content-type property to 'text/xml; charset=utf-8'. Simple and easy... Thanks all,-- Luiz Fernando B. Ribeiro ___ 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] Change the encoding of a single ZPT page
Hello all,Is it possible to change the encoding of a page without having to change the default-zpublisher-encoding option in zope.conf?My default encoding is iso8859-1 but we have to generate some XML files to a flash app, but flash only accept utf-8. I tried to encode the individual dynamic strings (obtained from database) in the XML with no success, since zpublisher is configured to iso8859-1 I think the xml is reencoded before it is sent. The XML file is declared with utf-8 encoding. All strings containing international characters are encoded to utf with python:reg.Field.decode('iso8859-1') in the xml file.Flash loads the xml but all international characters disappears.I'm using Zope 2.9, MySQL 4.0 with ISO8859-1 encoding.Thanks in advance,-- Luiz Fernando B. Ribeiro ___ 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] UnicodeDecodeError
Hi all,Due to project demands I had to convert the html entities in all TEXT fields in my database to the real international characters like á, ç and so on. The problem is that all my dynamic generated XML started to fail with UnicodeDecodeError. The XML encoding is set to utf-8 and the file itself is correctly encoded. If I inject the international characters using a Python Script with something like u'çáé' it works, but passing the TEXT field from the database generates the error.I'm using Zope 2.9.2 and MySQL. The XML is generated using ZPT. The XML, invokes a script to filter and add links to the text retrieved from the database, ex:?xml version='1.0' encoding='utf-8'?... xml stuff ... txt tal:content=structure python: container.scripts.montarCDATA(texto=obra.Conteudo, links=obra.links)/txt rdp tal:content=structure python:container.scripts.montarCDATA(texto=obra.Rodape)/rdp ... xml stuff ...obra is the database row and Conteudo is the TEXT field.montarCDATA is as simple as (I removed the code to build the links):return '![CDATA[%s]]' % textoif instead of the TEXT field I put something like: return '![CDATA[%s]]' % u'çáéà'it works, which leads me to believe the problem is with the database field and XML. The strange thing is that with common html everything works as expected.Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Shared.DC.Scripts.Bindings , line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec Module Products.PageTemplates.PageTemplate , line 105, in pt_render ZopePageTemplate at /path/to/file/ano.xml Module StringIO, line 271, in getvalueUnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 50: ordinal not in range(128) Thanks in advance,-- Luiz Fernando B. Ribeiro ___ 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] Rollback and delete weird behavior
Hello, In a python script I got a structure like this: # Many request checks # A zSQl method deleting some old data cotainer.doDelete(key=key) errors = [ ] for data in list: # Other checks if error: errors.append(error) continue # Inserts in mysql database cotainer.doInsert(data=data, other=stuff) if errors: raise An Error with list of error: %s % ', '.join(errors) # --- cut --- The problem is that the raise is not rolling back the delete, looking in mysql log the following sequence was found: --Begin transaction [delete statement] [the insert statements] --Rollback --Begin transaction!! [delete statement again] !! --Commit !!! We tried it many times and revised our code. The only solution was to put the delete statement in weird block like this: if True: cotainer.doDelete(key=key) As if the rollback was only effective against a 2nd level instruction. This is a really odd behavior but with this trick the rollback was done correctly. Has anyone ever seen this? Luiz Fernando B. Ribeiro ___ 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] Re: Import Modules
Florent Guillaume escreveu: Andreas Jung wrote: I manage my own servers developing web applications and I would like to remove the import restrictions of python modules in python scripts. Is it possible? How can I allow other modules to be imported? I have been using external modules but it is starting to become nonproductive since I have to create functions to simple problems like md5, re, etc, and just using the needed modules would be much simple. Check for allow_module(). However this is *not* a solution for all and everything. There are several that will define not work properly with PythonScript (including 're'). See Products/PythonScripts/README.txt for a description of how to enable regexps in python scripts. Sorry, I meant Products/PythonScripts/module_access_examples.py Thanks a lot, the instructions in Products/PythonScripts/module_access_examples.py work as expected. I'm amazed that the example given in the Products/PythonScripts/README.txt (using re) doesn't work, why is it there? Thanks all for your time. Luiz Fernando ___ 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] Import Modules
Hello, I manage my own servers developing web applications and I would like to remove the import restrictions of python modules in python scripts. Is it possible? How can I allow other modules to be imported? I have been using external modules but it is starting to become nonproductive since I have to create functions to simple problems like md5, re, etc, and just using the needed modules would be much simple. I use Zope as an application server and my clients do not have access to the ZMI, so I'm not concerned with protection against misuse by my clients. Thanks in advance, -- Luiz Fernando B. Ribeiro ___ 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] acl_users in MySQL
Hello, I've been searching for a solution on how to integrate my actual database of users (in MySQL) with the Zope authentications machinery. I found some old instructions (2001) using LoginManager and zPatterns but I would like to hear from you about the alternatives. Currently I'm using my own authentication method but with this I'm loosing a lot of Zope features. Zope 2.9 MySQl 4.1 Using reverse proxy with Pound Any suggestions? Thanks in advance. -- Luiz Fernando B. Ribeiro Engenho Soluções para a Internet ___ 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] single sign-on
David H wrote: Robert, You can python + COM your way to a browser startup zope/plone login screen. I cannot see how you automate the authentication of a given browser instance that is then handed to your users. Hmm, that's not automation in this sense. The user logins into the workstation (Windows, don't know about unix), the user opens the browser and accesses an INTRANET page. The browser (IE or Firefox with NTLM setup) will then send authentication information to the Intranet server using the NTLM protocol. The web server (Apache with NTLM module) checks with some internal Domain server and sets the environmental variable REMOTE_USER. This is then sent to a CGI or FastCGI app (zope with FastCGI). Maybe someone will correct this. If so everyone's happy. Yes, local Intranet users love this, one less login, automatic recognition, personalisation, instant gratification,... ;-) Cheers, Fernando ___ 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] single sign-on
Dieter Maurer wrote: Yes, I understand the alternative to FastCGI, but mod_proxy doesn't pass the required environmental variable REMOTE_USER to zope. I was asking about single sign-on alternatives for Zope. In principle, the rewrite rules allow to specify environment extensions. When I remember right, you use an E=... in the [P, ...] to call for such an extension. Indeed, I also looked into mod_rewrite (which I'm using anyway) and I realised I could put the user id into the URL with %{LA-U:REMOTE_USER}. That's a special case of %{ NAME_OF_VARIABLE }, required because this variable is set by the authorization phases which come after the URL translation phase where mod_rewrite operates. The problem is that I have no knowledge of zope internals, including VHM. And not much time (or money) to fix it. Any idea if it would be a simple matter of patching RemotUserFolder or would it require additional patching to VHM, etc? If feasible, this could indeed be a nice solution, only with positive impact (get rid of FastCGI). Regards, Fernando ___ 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] single sign-on
Dieter Maurer wrote: Yes, I understand the alternative to FastCGI, but mod_proxy doesn't pass the required environmental variable REMOTE_USER to zope. I was asking about single sign-on alternatives for Zope. In principle, the rewrite rules allow to specify environment extensions. When I remember right, you use an E=... in the [P, ...] to call for such an extension. Actually, I see now you are referring to the substitution flags. This is indeed env|E=VAR:VAL but the idea is to set an environmental variable which can be later dereferenced in many situations, but usually from within XSSI (via !--#echo var=VAR--) or CGI (e.g. $ENV{'VAR'}). But, unless I'm missing something, this solution hits the problem that environment variables are not passed into zope (except through FastCGI). Regards, Fernando ___ 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] single sign-on
Robert Boyd wrote: FastCGI is deprecated, but it still can be used, correct? I also use it to pass REMOTE_USER from Apache to Zope (in a Shibboleth set-up), and nobody has given me an alternative using rewrite and proxy. Well, you'll get a warning of the deprecation at start time. That's all, I believe. But since it is deprecated, bug fixing/improvements will not be done, like this one: filestream_iterator handling is not implemented for FastCGI protocol, see http://www.zope.org/Collectors/Zope/1647 Furthermore, I have another annoying problem with the current setup. I provide some files from the file system, through LocalFS, but it doesn't work with Apache+NTLM+FastCGI. Rather than getting the file I get the description of the object, like open file '/work/docs/MyFile.PDF', mode 'rb' at 0x42310974 Regards, Fernando ___ 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] single sign-on
Hi, I'm doing single sign-on using Apache+mod_ntlm+FastCGI. Since the last is deprecated, is there any alternative? TIA, Fernando Martins ___ 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] single sign-on
Hi, I'm doing single sign-on using Apache+mod_ntlm+FastCGI. Since the last is deprecated, is there any alternative? As documented: Zope as standalone server + an optional reverse proxy (Squid/Apache). But no idea how this would solve a SSO issue. -aj Yes, I understand the alternative to FastCGI, but mod_proxy doesn't pass the required environmental variable REMOTE_USER to zope. I was asking about single sign-on alternatives for Zope. Fernando ___ 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] single sign-on
Lennart Regebro wrote: On 3/30/06, Fernando Martins [EMAIL PROTECTED] wrote: Yes, I understand the alternative to FastCGI, but mod_proxy doesn't pass the required environmental variable REMOTE_USER to zope. I was asking about single sign-on alternatives for Zope. Yale made a system called CAS, that workes fine for SSO. It's simple and secure and easy to implement. My PAS plugin is available at http://www.zope.org/Members/regebro . I have a CookieCrumbler type thingy somewhere too. Interesting to know about, but it seems to be restricted to web sso, whereas I had in mind sso including the workstation login. It seems to be a full authentication mechanism on its own and it doesn't integrate with existing authentication systems, right? (no NTLM and it uses kerberos but on it's own) Thanks, Fernando ___ 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] LocalFS problem
Hi Chris, Fernando Martins wrote: I'm using LocalFS 1.7rc? and Zope 2.8.? in a Suse system. More importantly for this case, zope is behind Apache 1.39 with module NTLM, What are you using to do NTLM? simply mod_ntlm. I'm following the procedure on this page to do single sign-on for my Intranet web site: http://diaryproducts.net/about/cms/zope_plone/zope_plone_sso_single_sign_on_ windows_domain The software used is also linked from there. through FastCGI, Why on earth would you inflict this on yourself? ;-) Because it is the only way to pass the Apache environmental variable REMOTE_USER to Zope. This variable is set by Apache after the NTLM authentication. I suppose PCGI is also possible, but I haven't tried it out. I'm well aware and concerned that FastCGI has become deprecated for lack of maintainer. I guess this will be a major upgrade obstacle for those doing Intranet single sign-on. Other than that I don't know of any concrete FastCGI problem. When I access a file in a LocalFS folder I get the following info, instead of the pdf file (in this case): open file '/work/docs/MyFile.PDF', mode 'rb' at 0x42310974. What's the code and urls you're using to access this? No code, I get this in the browser just with an url like this: http://mysite.intranet/docs/MyFile.PDF /mysite/docs is a LocalFS folder that maps to a (Linux) folder /work/docs. (/mysite is a zope folder invisible for the users, through some URL rewriting done in Apache) The LocalFS folder accessed in the past through Apache+mod_rewrite without NTLM+RemoteUserFolder used to work fine. Interesting... yes, it was after adding NTLM+FastCGI to Apache+Zope that I got the LocalFS problems. So, the combination Apache+NTLM+FastCGI+RemoteUserFolder with LocalFS isn't working well. My guess would be RemoteUserFolder is the cuplrit. What is this RemoteUserFolder and where did you get it from? Got it from http://www.zope.org/Members/djay/RemoteUserFolder although I don't follow your logic since RemoteUF works fine with the rest of zope. RUF doesn't do any real authentication, I guess, it simply adds the REMOTE_USER user to the user folder and lets zope know the user is authenticated. Simple job I guess. Cheers, Fernando cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] LocalFS problem
Hi, I'm using LocalFS 1.7rc? and Zope 2.8.? in a Suse system. More importantly for this case, zope is behind Apache 1.39 with module NTLM, through FastCGI, and users folder is a RemoteUserFolder. mod_rewrite and Virtual Host Monster is being used do do some URL rewriting. When I access a file in a LocalFS folder I get the following info, instead of the pdf file (in this case): open file '/work/docs/MyFile.PDF', mode 'rb' at 0x42310974. The same file in another folder behind Apache+NTLM works fine. The LocalFS folder accessed in the past through Apache+mod_rewrite without NTLM+RemoteUserFolder used to work fine. The same file in LocalFS accessed through zope directly (another port; no apache) is delivered fine. So, the combination Apache+NTLM+FastCGI+RemoteUserFolder with LocalFS isn't working well. The only clue I have is that I get the file object description rather than the file itself. Any hints? TIA, Fernando ___ 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] Going to 3.0
We use a Psycopg connection, and Z SQL Objects... We don't have any programs written in python that use zope interfaces and so on. We have a entire site written in DTML in Zope 2.x. Now, after some discuss here We want to migrate it to Zope3.x. and start to develop using the zope 3 facilities and OO and ZPT. I already install Zope 3.1.0 and try to copy the Data.fs. But it produces a lot of erros. How can I handle this? Will exist a way to migrate from Zope 2.x to Zope 3.x? Thanks in advance. Fernando Lujan ___ 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] Going to 3.0
2006/1/9, Andreas Jung [EMAIL PROTECTED]: I already install Zope 3.1.0 and try to copy the Data.fs. From where to where? From /home/zope/zope2.0/var/Data.fs to /home/zope/zope3.0/var/ But it produces a lot of erros. How can I handle this? Which errors? Hi Andreas, Thanks for the reply. :) This behavior is intriguer since we only use DTML with logic and stuff... Nothing special as our own products etc... We sure have some products, but it should not crash the main system. Oh, and now I tried now Zope 3.2.0. 2006-01-09T17:15:19 WARNING ZODB.FileStorage Ignoring index for /home/flujan/tmp/zinstance/var/Data.fs Traceback (most recent call last): File ./runzope, line 48, in ? run() File ./runzope, line 44, in run main([-C, CONFIG_FILE] + sys.argv[1:]) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/twisted/main.py, line 74, in main service = setup(load_options(args)) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/twisted/main.py, line 143, in setup notify(zope.app.appsetup.interfaces.DatabaseOpened(db)) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/event/__init__.py, line 23, in notify subscriber(event) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/event/dispatching.py, line 66, in dispatch for ignored in subscribers(event, None): File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/component/__init__.py, line 181, in subscribers return sitemanager.subscribers(objects, interface) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/component/site.py, line 89, in subscribers return self.adapters.subscribers(required, provided) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/interface/adapter.py, line 481, in subscribers subscribers = [subscription(*objects) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/appsetup/bootstrap.py, line 135, in bootStrapSubscriber db, connection, root, root_folder = getInformationFromEvent(event) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/appsetup/bootstrap.py, line 120, in getInformationFromEvent root_folder = root.get(ZopePublication.root_name, None) AttributeError: 'PersistentMapping' object has no attribute 'get' ___ 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] Going to 3.0
2006/1/9, Fernando Lujan [EMAIL PROTECTED]: 2006/1/9, Andreas Jung [EMAIL PROTECTED]: Which errors? Hi Andreas, Thanks for the reply. :) This behavior is intriguer since we only use DTML with logic and stuff... Nothing special as our own products etc... We sure have some products, but it should not crash the main system. Oh, and now I tried now Zope 3.2.0. 2006-01-09T17:15:19 WARNING ZODB.FileStorage Ignoring index for /home/flujan/tmp/zinstance/var/Data.fs Traceback (most recent call last): File ./runzope, line 48, in ? run() File ./runzope, line 44, in run main([-C, CONFIG_FILE] + sys.argv[1:]) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/twisted/main.py, line 74, in main service = setup(load_options(args)) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/twisted/main.py, line 143, in setup notify(zope.app.appsetup.interfaces.DatabaseOpened(db)) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/event/__init__.py, line 23, in notify subscriber(event) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/event/dispatching.py, line 66, in dispatch for ignored in subscribers(event, None): File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/component/__init__.py, line 181, in subscribers return sitemanager.subscribers(objects, interface) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/component/site.py, line 89, in subscribers return self.adapters.subscribers(required, provided) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/interface/adapter.py, line 481, in subscribers subscribers = [subscription(*objects) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/appsetup/bootstrap.py, line 135, in bootStrapSubscriber db, connection, root, root_folder = getInformationFromEvent(event) File /home/flujan/tmp/zope/zope3.2.0/lib/python/zope/app/appsetup/bootstrap.py, line 120, in getInformationFromEvent root_folder = root.get(ZopePublication.root_name, None) AttributeError: 'PersistentMapping' object has no attribute 'get' ___ 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] Python Classes and Zope.
There's a way to use a Python class inside zope? For instance, if I create the class: class MyClass: A simple example class i = 12345 def f(self): return 'hello world' Can I invoke the following code inside a Python Script? x = MyClass() x.f() I'm using zope 2.7.x series. Thanks in advance. Fernando Lujan ___ 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] Python Classes and Zope.
Andreas Jung wrote: Sure you can but you shouldn't..you start with one class and at the end you have an application with tons of such codeyou can program that way but you shouldn't :-) I will print and read the Developer Book... ;) Thanks for all replies. Fernando Lujan ___ 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] init.d script and out of place instances
Thanks for all the replies! I got quite a good picture of the situation. Final solution was to symlink zopectl into init.d and run update-rc.d. In the meanwhile, I've also come across two relevant links which might be useful for someone else: similar problem: http://plone.org/documentation/how-to/helpcenterhowto.2005-10-24.6883487858/ talkback/1130736742/discussionitem_view Debian zope/plone package web page: http://pkg-zope.alioth.debian.org/ Regards, Fernando ___ 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] HTML to PDF.
Chris Withers wrote: A tool to do what, specifically? A Front-End to design the PDF format. Like Jasper Reports, but one which works with python and reporlab. :) Thanks. Fernando Lujan ___ 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] HTML to PDF.
Andreas Jung wrote: --On 23. November 2005 16:08:42 -0200 Fernando Lujan [EMAIL PROTECTED] wrote: Chris Withers wrote: A tool to do what, specifically? A Front-End to design the PDF format. Like Jasper Reports, but one which works with python and reporlab. :) Did you look at XSLFO as suggested. It really works Yes and I found this product: http://www.stylusstudio.com/xml_screenshots.html With this tool, I can create a HTML export to a XML. And with this XML, can I generate dinamic PDF files on the fly with the reportlab's software? Thanks in advance. Fernando Lujan ___ 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] HTML to PDF.
Andreas Jung wrote: --On 23. November 2005 16:45:00 -0200 Fernando Lujan [EMAIL PROTECTED] wrote: Yes and I found this product: http://www.stylusstudio.com/xml_screenshots.html You should read my former answer carefully. I pointed you to the tool CSSTOXSLFO and the Xinc PDF converter (www.lunasil.com). Both are Java based applications and can be integrated into Python and Zope. Hi Andreas, Yes... I saw this tool. But the company wants a python solution for this... :( Thanks anyway. :) Fernando Lujan ___ 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: [Spam] Re: [Zope] HTML to PDF.
Asad Habib wrote: Fernando. There is a python equivalent of the PHP script HTML_ToPDF.php that you can use as well. And it's free as well! Thanks Asad. I already downloaded it... How can I use it passing a HTML file and returning a PDF to the browser? Did you already work with it? Thanks. Fernando Lujan ___ 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] init.d script and out of place instances
Hi, As far as I can see and tried, the zope2.8 script only deals with instances which are created in the default instance directory, /var/lib/zope2.8/instance/. I would prefer to keep a specific instance of zope in a different directory, together with other related directories, e.g. files from LocalFS. That is, I prefer to have all directories of the application, zope or not, under a common directory. Is there anything wrong with this approach?? I tried to symlink into the instance into /var/lib/zope2.8/instance but the start script fails. BTW, where are the messages logged? (I'm running Ubuntu) Is there any solution? Is this specific to the distribution? Regards, Fernando ___ 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] HTML to PDF.
Chris Withers wrote: Fernando Lujan wrote: It's easy to configure and stuff? We currently are working with the reportlab, but it's painful to change the document... :( I need a product which generates a PDF file on the fly. I'm guessing you're using the open source reportlan library? Maybe you should think about going up to the RML processor they do, which costs money but is pretty amazing. What sort of budget do you have for this? A small budget. But my company is really interested in such processor/tool/product. Long ago, I sent a e-mail to the reportlab team. I wanted to know if they provide a tool similar to iReport. But I received no answer. Now, I ask again... is there such tool? Thanks in advance, Fernando Lujan ___ 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] HTML to PDF.
Does Anyone has this product in a production environment? It's easy to configure and stuff? We currently are working with the reportlab, but it's painful to change the document... :( I need a product which generates a PDF file on the fly. Any other application or suggestion will be welcome. Thanks, Fernando Lujan ___ 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: zope 2.8.4 on windows 98
I've From: Andreas Jung [mailto:[EMAIL PROTECTED] --On 15. November 2005 11:09:08 + Chris Withers [EMAIL PROTECTED] wrote: Fernando Martins wrote: File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 84, in createEventSecurityObject sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1) pywintypes.error: (120, 'InitializeSid', 'This function is only valid in Win32 m ode.') Andreas, was your testing with a 2.8.4-based system? I remember reading about the work that Mark Hammond did to make things better for Zope on Windows, but it looks like this might have spelled the end for Zope working on Win98 ;-) I think we are using 2.8.1 (we are using our own Zope version which is always tied to the normale release schedule). I've tried all versions from 2.8.1 and I always get the same error. I don't have MSVC to try the tarball install. I wonder if there is some detection code which is wrongly assuming I'm running an NT kernel. Maybe it's something in my system which is misleading zope. Is it simple to do a debug/stepping over zope to see what's going on? I've only used Boa Constructor a bit (hmm, I suppose threads are only started by the end of initialization). Fernando ___ 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: zope 2.8.4 on windows 98
From: J Cameron Cooper Probably this is just in the start sequence. You cannot, of course, run Zope as a service in Win98, since it understands no such thing. Quite possibly you can use runzope or whatever to execute it in a console. I can't say exactly as the traceback has been edited out of this thread (and I've deleted the old messages). Indeed it's in the start sequence and I'm not trying to run it as a service. This is the traceback: Traceback (most recent call last): File C:\Program Files\Zope-2.8.4\lib\python\Zope2\Startup\run.py, line 56, i n ? run() File C:\Program Files\Zope-2.8.4\lib\python\Zope2\Startup\run.py, line 21, i n run starter.prepare() File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Zope2\Startup\__init__.py, line 99, in prepare self.registerSignals() File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Zope2\Startup\__init__.py, line 320, in registerSignals Signals.registerZopeSignals([self.cfg.eventlog, File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\Signals.py, line 116, in registerZopeSignals SignalHandler.registerHandler(SIGTERM, shutdownFastHandler) File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 207, in registerHandler sa = createEventSecurityObject() File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 84, in createEventSecurityObject sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1) pywintypes.error: (120, 'InitializeSid', 'This function is only valid in Win32 m ode.') I wonder if this could a problem of the installer, but doesn't seem very likely as I assume it doesn't change the source code. I didn't have the time to try the tarball in win98SE. I have no idea how much work that could be. Fernando ___ 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] Re: zope 2.8.4 on windows 98
Andreas Jung wrote: On Sat, 12 Nov 2005 03:52:28 -0800, Fernando Martins fernando at cmartins.demon.nl wrote: I understand the problem, but is it the intention that zope is not supported on win98? Yes, I believe this is intentional. Windows 98 is a seven year old OS with insufficient infrastructure to reliably run server tasks anyway. At least get Windows 2000, which has a decent kernel. However that does not mean that Zope won't run on Windows 98. For a recent project where we ship and install Zope on all customers desktop machines I had to do a lot of testing especially on Windows 98. I've been using zope 2.7.4 on win 98 for some development/testing, not as a real server. But I'm confused by your statement: if zope 2.8.4 is calling an NT security function, not available in win98, then it does NOT run on win98?? DO you mean there is something wrong with my win98 setup or that zope 2.8.4 could be patched to overcome this issue? Thanks, Fernando ___ 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] zope 2.8.4 on windows 98
Hi, I tried to install zope 2.8.4 on win98SE. After starting the instance, it dies with the following error: File C:\Program Files\Zope-2.8.4\lib\python\Zope2\Startup\run.py, line 21, i n run starter.prepare() File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Zope2\Startup\__init__.py, line 99, in prepare self.registerSignals() File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Zope2\Startup\__init__.py, line 320, in registerSignals Signals.registerZopeSignals([self.cfg.eventlog, File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\Signals.py, line 116, in registerZopeSignals SignalHandler.registerHandler(SIGTERM, shutdownFastHandler) File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 207, in registerHandler sa = createEventSecurityObject() File C:\PROGRAM FILES\ZOPE-2.8.4\lib\python\Signals\WinSignalHandler.py, lin e 84, in createEventSecurityObject sidEveryone.Initialize(ntsecuritycon.SECURITY_WORLD_SID_AUTHORITY,1) pywintypes.error: (120, 'InitializeSid', 'This function is only valid in Win32 m ode.') I understand the problem, but is it the intention that zope is not supported on win98? Is there a workaround? Fernando ___ 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] DateTime again.
Is it possible to informe the DateTime module about the date format without changing the zope.conf file? Format: dd/mm/ When I try the dtml-var DateTime(12/11/2005) it returns 2005/12/11 instead of 2005/11/12. Thanks in Advance. Fernando Lujan ___ 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: OOP and Zope.
On 8/22/05, Lennart Regebro [EMAIL PROTECTED] wrote: For Zope3, a good start is Web Component Development with Zope 3: http://www.amazon.com/exec/obidos/tg/detail/-/3540223592/002-4460899-6725627?v=glance I bought the book... But while it don't arrive, let me ask a last question... Is there a tutorial which allows me to work with pages in the .py format? Then, I could only use python to generate the content... :D I've seen a lot of pages in this format... Does Zope works with it? Fernando Lujan ___ 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: OOP and Zope.
On 8/22/05, Josef Meile [EMAIL PROTECTED] wrote: Yes, some people wants to drop them, but that is just a part of the problem. Their bugs aren't a priority know, so, if I were the OP, I wouldn't use them for a new development. I would use python based products, which are also OO. I have a good knowledge of using python, there's some tutorial about using it inside Zope with a OO design? Thanks. Fernando Lujan ___ 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] OOP and Zope.
Hi, I try to find information about programming in Zope with the OO paradigm. I didn't find many documentation... For instance, how can I define classes and instances once I just work with dtml-methods and dtml-documents? Thanks. Fernando Lujan ___ 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] Help need for a Zope presentation to java lovers...
On 8/17/05, Chris McDonough [EMAIL PROTECTED] wrote: I only meant that it would get dynamic data using XML-RPC queries, but I already have an efficient product for this, so it's not an issue. So what they want is a Web Management Framework and CMS system. And they wonder if Zope is better than a JSP/Struts/Velocity solution. Please, give us a feedback about your presentation. ;) It's a very interesting topic to discuss. Fernando Lujan ___ 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] ZPsycopg - Losing Connections
On 7/27/05, Peter Bengtsson [EMAIL PROTECTED] wrote: On 7/27/05, Fernando Lujan [EMAIL PROTECTED] wrote: On 7/27/05, David [EMAIL PROTECTED] wrote: Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 - Solaris 8 (Intel) The Psycopg version 1.1.19 solves this problem. :) The 1.1.19 version isn't in debian yet. $ apt-get show python-psycopg shows only 1.1.18 :( So, use the source... ;) -- Fernando Lujan ___ 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] WebDAV
Dieter Maurer wrote: Luiz Fernando B. Ribeiro wrote at 2005-6-27 16:00 -0300: I'm using webdav to update to access files from Dreamweaver and it is working fine but when I try to use windows web folders feature it fails with the following error in zope log. It seems that windows is requesting the PROPFIND before authenticating. Any clues? Zope Version (Zope 2.7.5-final, python 2.3.5, linux2) Python Version 2.3.5 (#2, May 4 2005, 08:51:39) [GCC 3.3.5 (Debian 1:3.3.5-12)] System Platform linux2 Time2005/06/27 15:05:48.973 GMT-3 User Name (User Id) Anonymous User (None) Request URL http://my.server/clientes/PROPFIND Exception Type Unauthorized Exception Value strongYou are not authorized to access this resource./strong This, by itself, is completely normal. MS WebDAV Access should in this case show a login dialog. After providing the correct authentication info, you should be able to access the folder. The MS WebDAV Access in my Windows XP Professional behaves in this way. Hi Dieter, The login dialog is show but even with my manager password it's not able to login. The error message above is repeated after each atempt. With Netdrive or Dreamweaver it works fine but windows web folders is a good feature for simple users. I thought that some kind of workaround was available. Even with Chris sugestion to use full url with user and password has failed. I'm using Windows XP SP2. Thanks, Luiz Fernando B. Ribeiro Engenho Soluções para a Internet ___ 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] WebDAV
I'm using webdav to update to access files from Dreamweaver and it is working fine but when I try to use windows web folders feature it fails with the following error in zope log. It seems that windows is requesting the PROPFIND before authenticating. Any clues? Zope Version (Zope 2.7.5-final, python 2.3.5, linux2) Python Version 2.3.5 (#2, May 4 2005, 08:51:39) [GCC 3.3.5 (Debian 1:3.3.5-12)] System Platform linux2 Time2005/06/27 15:05:48.973 GMT-3 User Name (User Id) Anonymous User (None) Request URL http://my.server/clientes/PROPFIND Exception Type Unauthorized Exception Value strongYou are not authorized to access this resource./strong Traceback (innermost last): * Module ZPublisher.Publish, line 92, in publish * Module ZPublisher.BaseRequest, line 449, in traverse * Module ZPublisher.HTTPResponse, line 680, in unauthorized Unauthorized: strongYou are not authorized to access this resource./strong Thanks in advance, -- Luiz Fernando B. Ribeiro Engenho Soluções para a Internet +55 11 6959-7610 ___ 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] Datetime bug in Zope-2.7.6?
Andreas Jung escreveu: --On 14. Juni 2005 00:17:19 -0300 Luiz Fernando [EMAIL PROTECTED] wrote: But I would prefer zope to work the same as python itself, that works as expected. You mean datetime? It is unlikely that this will happen for Zope 2 in the future. -aj Yes, when using date fields returned from zSQL methods. Extracting the .day .month and .year values works correctly but when you use strftime(%any_format) the resulting date is offset by one day. Luiz Fernando ___ 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-dev] ZpdfDocument
Hi, Are someone developing some Product like ZpdfDocument? Today, If I need a pdf file, I use the reporlab lib, and write it from scratch... A better solution exist? Thanks and Regards. -- Fernando Lujan ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Datetime bug in Zope-2.7.6?
Dennis Allison escreveu: Zope 2.7.6 Python 2.4.1 (and yes, I know I am jumping the gun a bit) The problem appears to be in the parse component -- Consider a test script: for y in range(1995,2005): for d in (1, 3, 13, 25,): for m in (1,4,5,6,): dd = '%d-%02d-%02d' % (y,m,d,) ee = '%d/%d/%d' % (m, d, y) D = DateTime(dd) E = DateTime(ee) print dd, D.strftime('%Y-%m-%d') print ee, E.strftime('%Y-%m-%d') return printed In all cases, each of the dates shoudl be the same. As can be seen, for dates sourced from a string of the form 1995-04-25 the resulatant date is off by one day 1995-04-24 The problem is not seen with Zope 2.6.4 running with Python 2.3.5. A quick diff shows tht there are many changes between 2.6 and 2.7. Anyone else seen this problem? Partial Results: 1995-04-25 1995-04-24 4/25/1995 1995-04-25 1995-05-25 1995-05-24 5/25/1995 1995-05-25 1995-06-25 1995-06-24 6/25/1995 1995-06-25 Yes it happes to me also every time I use strftime, so I stopped using it. Someone posted a patch to fix this in this list not a long ago. I think this is a problem of interpretation on how the default behavior should be as these dates do not have any Timezone information. But I would prefer zope to work the same as python itself, that works as expected. Luiz Fernando B. Ribeiro ___ 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] Visual Reporting tool.
Hi, I want to know, if is there a visual reporting tool? Like JasperReport, for example, wich works with reportlab's libraries and generate a .py. Thanks and regards, Fernando Lujan ___ 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] WebDav or Calendar.
Hi, I need a Calendar or WebDav product wich runs with Zope, allow me to share my calendar with others users using mozilla Calendar, Sunbird. evolution, outlook and so on...Something like OpenGroupware. Do someone have a good suggestion? :) Thanks and regards. Fernando Lujan ___ 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] Create a list using DTML.
On 24/05/05, J Cameron Cooper [EMAIL PROTECTED] wrote: Personally, I'd probably just do something like:: {1,2,3}[1:-1].split(',') This code works as expected... Thanks! :) -- Fernando Lujan ___ 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] Generatiing Lists with DTML.
Hi, I have a array data type in my DB wich have the following format : {1,2,3} ( ids_test ). Now in my web application, I have a multiple select wich options must be marked as selected if the number is in the array described above. How can I make the above format be converted to a list of elements? For instance: html body dtml-in searchIdsTest dtml-call REQUEST.set('ids_test', '['+ids_test[1:-1]+']') /dtml-in form select name=id_test multiple=true dtml-in serch_id_test option value=dtml-id_test; dtml-if id_test in ids_test selected=true/dtml-if/option /dtml-in /select /form /body /html Thanks. Fernando Lujan ___ 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] Create a list using DTML.
Hi, I have a array data type in my DB wich have the following format : {1,2,3} ( ids_test ). Now in my web application, I have a multiple select wich options must be marked as selected if the number is in the array described above. How can I make the above format be converted to a list of elements? For instance: html body dtml-in searchIdsTest dtml-call REQUEST.set('ids_test', '['+ids_test[1:-1]+']') /dtml-in form select name=id_test multiple=true dtml-in serch_id_test option value=dtml-id_test; dtml-if id_test in ids_test selected=true/dtml-if/option /dtml-in /select /form /body /html Thanks. Fernando Lujan ___ 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] Create a list using DTML.
On 24/05/05, David H [EMAIL PROTECTED] wrote: I have a array data type in my DB wich have the following format : {1,2,3} ( ids_test ). Now in my web application, I have a multiple select wich options must be marked as selected if the number is in the array described above. How can I make the above format be converted to a list of elements? For instance: html body dtml-in searchIdsTest dtml-call REQUEST.set('ids_test', '['+ids_test[1:-1]+']') /dtml-in form select name=id_test multiple=true dtml-in serch_id_test option value=dtml-id_test; dtml-if id_test in ids_test selected=true/dtml-if/option /dtml-in /select /form /body /html I think you are close. Change dtml-if ids_test in ids_test to dtml-if ids_test in ids_test ? It's working like IN over a string, e.g. the [5,61] will make selected the number 5,6 and 61. dtml-call REQUEST.set('ids_test', '(' + id_test[1:-1] + ')') Where id_test is the result of the database query wich return in this format: {1,2,3}. I modify it to a (1,2,3) and finally I try the dtml-call REQUEST.set('list', _.list(ids_test)) Following this api: list (sequence) Return a list whose items are the same and in the same order as sequence's items. If sequence is already a list, a copy is made and returned, similar to sequence[:]. For instance, list('abc') returns returns ['a', 'b', 'c'] and list( (1, 2, 3) ) returns [1, 2, 3]. I need a integer-list, is it possible? -- Fernando Lujan ___ 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] Answer's Time
I'm having the following problem and wanna know whether it can be associated with Zope. I have a page in my system with various links, and when I click in a link, for instance link 1. The cursor starts being busy, the browser appear to send the request but there is no response. When it happens, if I open another window and click in the same link, I have the response immediately. It's tuly very weird... How can I debug it? I'm using Zope 2.74 with python 2.3.4. Suggestions will be welcome. Thanks and regards. Fernando Lujan ___ 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] strftime
Hello, I'm displaying dates retrieved from a MySQL database using: span tal:content=python: news['Date'].strftime('%d/%m/%Y')Date/span In a strange behaviour using strftime is displaying dates with 1 day past, example 10/05/2005 is being show as 09/05/2005. If i change the code to show the date as it comes from MySQL it is correct and if I change the code to not use strftime and manually retrieve .month() .day() .year() it is also correct. My locale in Zope is set to BRT and in console everything works. Zope 2.7 and Pthin 2.3 from debian sarge. Thanks, -- Luiz Fernando B. Ribeiro Engenho Soluções para a Internet +55 11 6959-7610 ___ 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] Generating and Downloading PDF[Solved]
Chris Withers wrote: Um? What else is that method returning? I'd suggest you call getrarTCE directly by URL, check you're setting the correct content-type and maybe set a content disposition too... Solved. :) I create a External Method that returns the code. I'm calling the external method using: dtml-var generatePDF(REQUEST.response) And I put the following lines at the end of the code: fname stands for the filename def generatePDF(page): os.rename(_fname, tces/+_fname) file = open(tces/+_fname).read() os.remove(tces/+_fname) page.setHeader('content-type', 'x-application/pdf') page.setHeader('content-length', str(len(file))) page.write(file) This was the best solution that I could thought, once reportlab didn't create PDF on the fly, without writing in the filesystem. ___ 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] Managing Users with Postgresql.
Hi, First let me describe my environment. I have a Postgresql database that stores all users, and booleans which describe permissions. The users log on in my application using a WebForm, I run a ZSQL Method and set all permissions in the Session. I manage the security using Session calls, checking each permission and then allow or deny access to the object. I know that it isn't the best solution, and now I want to change it! :) Which is the best solution to solve my problem? I found pgUserFolder. But I'm not so sure if this will be the best solution. Thanks... Fernando Lujan ___ 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] Access log
Hi all, I am hosting several virtual hosts and I need to provide access log reports (like awstats) for my clients. I would like to know if any of the following alternatives is possible: 1. Is it possible to have diferent access log files for each virtual host? 2. Is it possible to include the %v (virtualhost) field in the current access log? I'm using Zope 2.6 from Debian sarge. Thanks in advance, -- Luiz Fernando B. Ribeiro Engenho Soluções para a Internet +55 11 6959-7610 ___ 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: ZEO and session variables.
Dennis Allison wrote: Hi Paul, Thank you. And, yes, I saw Chris' posting, but I don't think that's the right solution for us. A fast shared session variable store seems to me to be a better way to go and a whole lot more fail safe. Hi Dennis, I posted a solution some time ago. Search the history, maybe it could help you. :) I haven't had time to write a how-to. :( Fernando Lujan ___ 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] Generating and Downloading PDF.
J Cameron Cooper wrote: It's easier to guess when you say what the problem is. I do see some funny indentation down at the bottom. OK, it's happen because I paste the code inside a html message, than it's happen. The following code is working. But I still have a problem. The browser ( firefox ) don't reconize the generated document as a PDF. I'm calling this external method through a dtml-var gerar_tce_pdf() tag, inside a DTML DOCUMENT. def gerarTCE(self): from reportlab.pdfgen import canvas import string import os c = canvas.Canvas(hello.pdf) c.drawString(100,100,Hello World) c.showPage() c.save() arquivo = open(hello.pdf).read() R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/pdf') R.setHeader('content-length', str(len(arquivo))) R.write(arquivo) Thanks for helping... :) Fernando Lujan ___ 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] Generating and Downloading PDF.
Hi guys, I'm creating a pdf using reportlab, after the canvas.close() I put the following code inside a External Method: R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data) But I receive the following error: *Error Type: NameError* *Error Value: global name 'self' is not defined Is there some import wich I have been missing? Fernando Lujan ___ 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] Generating and Downloading PDF.
J Cameron Cooper wrote: The method that contains your code must have at least the first parameter 'self':: def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data) It's a way of getting access to context. OK, thanks. But how can I pass the self parameter using the dtml-call tag? dtml-call pdfwrite(self) is correct? Because I'm using this and works fine. Fernando Lujan ___ 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] Generating and Downloading PDF.
J Cameron Cooper wrote: Fernando Lujan wrote: J Cameron Cooper wrote: The method that contains your code must have at least the first parameter 'self':: def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data) It's a way of getting access to context. OK, thanks. But how can I pass the self parameter using the dtml-call tag? dtml-call pdfwrite(self) is correct? Because I'm using this and works fine. It's Python magic. When you call a function/method on an object, the object is provided as the first parameter of the method. This is implicit, I believe, in DTML calls, either expression or name. It's explicit in TALES and Python:: context/pdfwrite context.pdfwrite() So, I put the code here. Please, what I'm missing? :) def gerarTCE(self, id_tce, cnpj_escola='', matricula=''): from reportlab.lib.colors import Color from reportlab.lib.pagesizes import letter from reportlab.platypus import Paragraph, SimpleDocTemplate, XBox from reportlab.lib.styles import ParagraphStyle from reportlab.pdfgen import canvas import os import urllib from reportlab.lib.units import inch, cm import time import string _linha = cm / 2.25 _fname = tce+id_tce+.pdf _c = canvas.Canvas(_fname, pagesize=letter) _width, _height = letter _aW = _width - 2 * cm _aH = 750 _c.bookmarkPage(TCE) _c.bookmarkPage(pagina1) _c.addOutlineEntry(TCE, TCE) _c.addOutlineEntry(Pagina 1, pagina1, 1) _c.showOutline() _c.setAuthor(NUBE - Núcleo Brasileiro de Estágios) _c.scale(1, 0.9) _c.setFont(Times-Bold, 16) _c.drawCentredString(_width / 2, 735, TERMO ADITIVO) _c.setFont(Times-Roman, 9) _c.drawCentredString( _width / 2, 735, (determinações legais estabelecidas no art. 5º e o §1º do art. 6º do Decreto 87.497/82 que regulamentou a Lei 6.494/77)) _c.drawCentredString( _width / 2, 725, (Atualizada pela Medida Provisória N.º 1952-22 de 30/03/2000)) _c.showPage() _c.save() R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/pdf') R.Header('content-length', str(len(_fname))) R.write(_fname) ___ 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] Zeo
ken wood wrote: I have noticed that most documentation on ZEO is a bit dated (2003). Where can I get newer documentation or HowTo on ZEO? The good and old Zope Book still rules... :) http://www.plope.com/Books/2_7Edition/ZEO.stx I recently used this chapter, it's self explanatory. Take a look at the zope.conf file too. It already have a example of ZEO. Fernando Lujan ___ 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] Session without cookies.
Jens Vagelpohl wrote: On Apr 12, 2005, at 1:02, Fernando Lujan wrote: The URL test1 in the form tag is obviously *not* generated by Zope. You put it in there manually. So it cannot work as you expect. Hum, I see. Just web pages that aren't dinamically generated by Zope. For instance, other DTML document will not keep the Session. Is this correct? No, you misunderstand what Chris said earlier. You need to let Zope generate the URL. In this case, instead of just saying... form action=test1 you could do form action=dtml-var test1.absolute_url() of course that's ugly because it looks like putting a tag inside a tag, ZPT is much nicer that way: form action= tal:attributes=action here/test1/absolute_url Thanks, jens... Now I acquire my goal! ;) Fernando Lujan ___ 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] ZEO and Sessions.
Hi again people, I've just read the article about SESSIONS in the upcoming ZOPE Book 2.7. Here, we have ZEO running, and I need to use SESSION and ZEO. I read the article http://www.zope.org/Members/randy/ZEO-Sessions. Isn't there a easy way to do this? I was wondering if I couldn just createa new filestorage entry in the zeo.conf, and add some lines in my zope.conf file. Thanks. Fernando Lujan ___ 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] ZEO and Sessions.
Chris McDonough wrote: Yes. All the information in that article is geared for Zope 2.5 which had no facility for using mounted databases from a config file... everything up until At this time you should be able to navigate to the /session_storage folder... in that article can be done by reconfiguring ZEO using zeo.conf to serve a new storage, changing your ZEO clients' zope.conf files to recognize the new storage and adding a ZODB Mount Point from within the ZMI from one of the appservers. The rest of it is pretty simple. ;-) Please, take a look in what I've done! Is that right? It works pretty fine here! :-) If this is right, are there a desire for a how-to? I think I can write one, once it's pretty simple as you said. zope.conf zodb_db main mount-point /temp_folder container-class Products.TemporaryFolder.TemporaryContainer # ZODB cache, in number of objects cache-size 5000 zeoclient server localhost:8100 storage 1 name zeostorage var $INSTANCE/var # ZEO client cache, in bytes cache-size 20MB # Uncomment to have a persistent disk cache #client zeo1 /zeoclient /zodb_db zodb_db temporary mount-point / # ZODB cache, in number of objects cache-size 5000 zeoclient server localhost:8100 storage 2 name zeotemporary var $INSTANCE/var # ZEO client cache, in bytes cache-size 20MB # Uncomment to have a persistent disk cache #client zeo1 /zeoclient /zodb_db zeo.conf # ZEO configuration file %define INSTANCE /home/flujan/tmp/zeo zeo address 8100 read-only false invalidation-queue-size 100 # monitor-address PORT # transaction-timeout SECONDS /zeo filestorage 1 path $INSTANCE/var/Data.fs /filestorage filestorage 2 path $INSTANCE/var/SessionData.fs /filestorage eventlog level info logfile path $INSTANCE/log/zeo.log /logfile /eventlog runner program $INSTANCE/bin/runzeo socket-name $INSTANCE/etc/zeo.zdsock daemon true forever false backoff-limit 10 exit-codes 0, 2 directory $INSTANCE default-to-interactive true # user zope python /usr/bin/python2.3 zdrun /usr/local/zope-2.7.5/lib/python/zdaemon/zdrun.py # This logfile should match the one in the zeo.conf file. # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. logfile $INSTANCE/log/zeo.log /runner ___ 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] Session without cookies.
Hi everyone, Is there possible to use a Session control without cookies? I already changed the browser_id_manager and unchecked the cookies and checked the Automatically Encode Zope-Generated URLs With A Browser Id option. But it's just stops working. :( In addition, where could I get the Examples? The Zope book has a mention of it, but I couldn't find the URL to download the Examples. Thanks! Fernando Lujan ___ 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] Session without cookies.
Chris McDonough wrote: On Mon, 2005-04-11 at 16:35, Fernando Lujan wrote: I already changed the browser_id_manager and unchecked the cookies and checked the Automatically Encode Zope-Generated URLs With A Browser Id option. But it's just stops working. :( Note that it says Zope-generated URLs. URLs that are not generated by Zope will not be encoded. The URL is generated by Zope. It's a simple code. I create two dtml documents with the following code. 1)test dtml-call SESSION.set('eg', 2) dtml-call SESSION.get('eg') form action=test1 input type=submit value=test1 /form 2) teste1 dtml-call SESSION.get('eg') The teste1 displays None, I expected it to display the number 2. :( In addition, where could I get the Examples? The Zope book has a mention of it, but I couldn't find the URL to download the Examples. Examples are available from the Quick Start page, which is available from the default index_html of your Zope root. I didn't have the Examples directory under my Zope instance... :( ___ 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] Session without cookies.
Jens Vagelpohl wrote: 1)test dtml-call SESSION.set('eg', 2) dtml-call SESSION.get('eg') form action=test1 input type=submit value=test1 /form It's a simple code. I create two dtml documents with the following code. The URL test1 in the form tag is obviously *not* generated by Zope. You put it in there manually. So it cannot work as you expect. jens Hum, I see. Just web pages that aren't dinamically generated by Zope. For instance, other DTML document will not keep the Session. Is this correct? I need to keep a SESSION through the entire site without cookies. Is that possible? Sorry if I made myself incomprehensible. Fernando Lujan ___ 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-dev] Bendiciones y un gran día para ti junto a Dios
Si aceptas a Dios y a su hijo Jesús el Cristo, entonces visita esta página www.enelnombredecristo.com Lee su mensaje y que Dios te bendiga. Un abrazo Fernando Areces Pd: esto no es religión, es solo un mensaje real. Gracias ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Problem with request/HTTP_X_FORWARDED_FOR
Hello, Sorry for the cross-posting but I've posted before on the zope list without reply. The following looks like to be a bug on the lookup of the request attributes. If request doesn't have the attribute HTTP_X_FORWARDED_FOR, the following TALES expression should return REMOTE_ADDR. In fact, it returns the empty string. p tal:content=request/HTTP_X_FORWARDED_FOR | request/REMOTE_ADDR/p Naturally, the following works ok: p tal:content=python: request['HTTP_X_FORWARDED_FOR'] or request['REMOTE_ADDR']/p Shall I file it as a bug or am I missing something? Cheers, Fernando ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )