Re: [Zope] Help installing Zope2 in AWS
On 9 Nov 2016, at 19:38, Norma Silva wrote: > Hello, > > Has someone installed Zope2 on Amazon Web Services (AWS)? > > Thanks in advance! What is the exact question/problem. Has anyone….likely… -aj signature.asc Description: OpenPGP digital signature ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Help installing Zope2 in AWS
Hello, Has someone installed Zope2 on Amazon Web Services (AWS)? Thanks in advance! NSilva ___ 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] help
Please remove me from the list At 07:00 2013-01-15, you wrote: Send Zope mailing list submissions to zope@zope.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to zope-requ...@zope.org You can reach the person managing the list at zope-ow...@zope.org When replying, please edit your Subject line so it is more specific than Re: Contents of Zope digest... Today's Topics: 1. ? Zope, Dhilip left a message for you (Badoo) -- Message: 1 Date: Tue, 15 Jan 2013 10:41:49 + From: Badoo noreply+356568...@badoo.com To: zope@zope.org Subject: [Zope] ? Zope, Dhilip left a message for you Message-ID: mailman.20.1358251201.10567.z...@zope.org Content-Type: text/plain; charset=utf-8 Dhilip left a message for you Its sender and content will be shown only to you and you can delete it at any time. You can instantly reply to it, using the message exchange system. To find out what was written to you, just follow this link: http://eu1.badoo.com/0308700839/in/aK06D1M0TPk/?lang_id=3g=57m=21mid=50f5326b000301059f6b02a254a60134 Some other people in the area who are on Badoo Suhail (Bengaluru, India) Maria (Bengaluru, India) Kays Snkay (Jakarta, Indonesia) http://eu1.badoo.com/0308700839/in/aK06D1M0TPk/?lang_id=3g=57m=21mid=50f5326b000301059f6b02a254a60134 If clicking the links in this message does not work, copy and paste them into the address bar of your browser. This email is a part of delivering a message sent by Dhilip on the system. If you received this email by mistake, please just ignore it. After a short time the message will be removed from the system. Have fun! The Badoo Team You have received this email from Badoo Trading Limited (postal address below). http://eu1.badoo.com/impersonation.phtml?lang_id=3email=zope%40zope.orgblock_code=c791bam=21mid=50f5326b000301059f6b02a254a60134 Badoo Trading Limited is a limited company registered in England and Wales under CRN 7540255 with its registered office at Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB. -- next part -- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope/attachments/20130115/d59f58af/attachment.html -- ___ Zope maillist - Zope@zope.org End of Zope Digest, Vol 103, Issue 5 - Aucun virus trouve dans ce message. Analyse effectuee par AVG - www.avg.fr Version: 2012.0.2221 / Base de donnees virale: 2638/5533 - Date: 14/01/2013 Daniel Godefroy Consultant en informatique de gestion 5732 Trans Island 2, Impasse Couloute MontrealPetion-ville Quebec, Canada H3W 3B2Haiti email:danielgodef...@videotron.ca Tel:(514) 382 5917 / 577 0738 (509) 3449 0738 BP 15264 http:///??.htmurl:www.gexperthaiti.com Voice over ip: 1 305 433 2762 / 1 514 448 1077 ___ 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
On Jan 15, 2013, at 14:01 , Daniel Godefroy danielgodef...@videotron.ca wrote: Please remove me from the list Just follow the link that you see at the bottom of every single email from the list. Thanks! jens ___ 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 Sun, Dec 4, 2011 at 06:12, Sareesh Sudhakaran ays...@hotmail.com wrote: I have a personal project - a web application I wanted to develop - but I'm confused on which route to take. I am not under any time constraint. Your case is complex and the answer is non-obvious. I think you will have to try to see. The best I can describe it is as a kind of expert system (but not AI) that needs to find the best workflow for a process, given a set of initial and final parameters. E.g. a 'capsule' of data must pass through many 'tools' or 'environments' to reach a desired output - something like a very complicated car wash. Let's say there are many tools that can be used at various stages in the process. I have estimated there are 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. This kind of complexity and flexibility that your case has does lend itself well to the ZODB. But it is by no means impossible to do in a relational database. What you would need to do here if you did this in SQL is to have one table for the tools, and one table for the properties, and one table that for each tool and property has a value. This might be a bit complex to use of you use an ORM, but it should be doable. problem of 'matching' the tools for analysis. E.g. Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how I can construct a database without spelling out each number, as in the example above. Well, if you want to search for a specific RPM range it does get complicated, because then you probably want to store the RPM values as integers. And that means that you in the property table needs to have several columns depending on the value type. If the property needs text, you need to fetch it from the text column. If the property is an integer you need to fetch it from the integer column. If the property is a reference to another table, because it is a multi-select property with a limited set, you need to fetch it from a column for that, which in turn refers to another table with the actual values. This *does* get very complex very quickly. Of course, the ZODB has few such problems. Will the app be better served with a relational DB like mySQL or an Object database? After a lot of research I've guessed that my particular case might be better served with Python and Zope/ZODB. But I might be wrong? Maybe PHP+mySQL or Django is a better fit? First of all, find yourself a web-framework you like. Then use that. Most likely, that framework is going to limit you to using SQL. There are frameworks that don't specifically Pyramid integrates nicely with ZODB and hence gives you a choice. Then I would simply try to see if you are able to model the data in SQL at all, or if you dig yourself into unholy complexity. That should not take more than a couple of days of work to figure that out, if you concentrate on building a database and filling it with real or realistic data. If you don't dig yourself into a hole, the go with SQL, since that's what you know. If you do, try to build the model with ZODB and see of that works better for you. The ZODB might very well be the right choice here. But note that Zope is not. Zope was a trailblazer in the web framework world that's been around for 15 years now, and has as a result made some choices which turned out to not be the best ones in the long run, and accumulated a lot of cruft. There is work on fixing this, but that will take time, and the framework will be in a great flux during that time. As a result, Zope is not currently a good choice if you start a project. As languages go, Python rules. As web frameworks go, there are more Python frameworks than you can shake a stick at. I'd recommend either Django (because there are so many people using it, you will be able to find help ) or Pyramid (because it's really cool and supports ZODB well). //Lennart ___ 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
Thank you all for your replies. I have an idea on how to begin: I'll go with mySQL and see how it works out. I will use both PHP and Python for the prototype. My issue no longer fits within the scope of this mailing list. Without your support it would have been impossible for me to get started. Thanks!sareesh ___ 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: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? What I mean is, when I read your high-level description of what you want to do, I imagine objects interacting with other. In your car wash example I see that, for instance. Or any kind of work-flow, which is what this sounds like to me. A state machine. Each tool is an object; it knows what its properties and abilities and possible states are and can communicate them to other objects and can accept and act on communication from other objects. In that way the objects interact with one another to do whatever it is you build them to do. I'm thinking of your car wash metaphor. In a car wash there are a variety of elements (objects) that communicate with one another to move the car through and to wash it as it moves through. Simple example: * mechanism that pulls or pushes the car through * mechanism that sprays it with water and soap * mechanism that scrubs and wipes and rubs it * mechanism that sprays it with rinse water * drying mechanism(s) These all need to signal one another so they do the right thing at the right time. Spray (or scrub or blow hot air) only when the car is in the right place for each. If some tools can be built by adding to/extending other tools, that is an object-friendly situation, since enhancing an existing tool to make another that you need saves you having to create all tools from scratch. In the car wash, maybe the different sized scrubbers used are all made by bolting together two or more of the smallest size scrubber. Maybe in parallel, maybe in series, depends on what is needed. Maybe the same scrubber controller can have different size brushes attached to it. In short, an object - tool - is code and data that interacts with other tools (other entities of code and data). An upgrade to a tool would involve changing the code and/or data that constitutes the tool. If that introduces some new way of interacting that other tools need to also know, then you add that to those tools also. Adding more tools means coding them. If they can be based on existing tools, so much the easier (and more object-appropriate). So that's some high-level information about an object-oriented approach to what I think your project is about. Tthe flexibility you appear to need as the system grows may be problematic for an RDB. And, my bias is OO, so perhaps someone who thinks in RDB-space can describe at high level how this would look in an RDB implmentation. cheers, John S. -- John Schinnerer - M.A., Whole Systems Design - Eco-Living - Whole Systems Design Services People - Place - Learning - Integration j...@eco-living.net http://eco-living.net ___ 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
Am Sonntag, 4. Dezember 2011, 16:15:13 schrieben Sie: 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? ...just from my experience: PHP is - for different, but mainly technical/historical reasons - very widely spread within web applications, one major reason was/is i.e. the large (because easy) availability on low cost hosting environments in the past - but the most advantages was/are on the side of the hosting providers PHP might be easier to learn then other languages or frameworks, but maintaining large / complex applications / software projects within PHP could be a real mess. We develop nearly any web application with Zope / ZODB since = 10 years but are a hosting company byself - so we was not bound to PHP as many other internet hosting users in the past. A colleagues company produces very high level expert systems on Perl and Catalyst - requiring high skilled Perl programmers. 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. Most web application data structures (i.e. a simple web page) fit's much better by a oo object strategy then a relational (RDBMS) one. The major typical ressource hole within typical PHP+SQL web applications or i.e. a CMS solution is the translation of typical data objects into tables and vice versa. Producing i.e. one simple CMS page within a PHP-SQL CMS easily could trigger hundreds of SQL requests into many different tables - a significant overhead which has to implemented by developers and handled by the machines. But this is my view onto the issue - just my two cents... cheers, Niels. -- --- Niels Dettenbach Syndicat ITInternet http://www.syndicat.com/ signature.asc Description: This is a digitally signed message part. ___ 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
Hi NielsI agree with you, even though I have no experience. But I'm restricted by hosting options for Zope at the moment, and will revert to Python once the project is deployed - and when I figure out whether mySQL is good enough or not. I hate having to type all those extra characters in php though.sareesh From: n...@syndicat.com To: ays...@hotmail.com; zope@zope.org Subject: Re: [Zope] Help in deciding approach to Web App Date: Mon, 5 Dec 2011 11:25:18 +0100 Am Sonntag, 4. Dezember 2011, 16:15:13 schrieben Sie: 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? ...just from my experience: PHP is - for different, but mainly technical/historical reasons - very widely spread within web applications, one major reason was/is i.e. the large (because easy) availability on low cost hosting environments in the past - but the most advantages was/are on the side of the hosting providers PHP might be easier to learn then other languages or frameworks, but maintaining large / complex applications / software projects within PHP could be a real mess. We develop nearly any web application with Zope / ZODB since = 10 years but are a hosting company byself - so we was not bound to PHP as many other internet hosting users in the past. A colleagues company produces very high level expert systems on Perl and Catalyst - requiring high skilled Perl programmers. 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. Most web application data structures (i.e. a simple web page) fit's much better by a oo object strategy then a relational (RDBMS) one. The major typical ressource hole within typical PHP+SQL web applications or i.e. a CMS solution is the translation of typical data objects into tables and vice versa. Producing i.e. one simple CMS page within a PHP-SQL CMS easily could trigger hundreds of SQL requests into many different tables - a significant overhead which has to implemented by developers and handled by the machines. But this is my view onto the issue - just my two cents... cheers, Niels. -- --- Niels Dettenbach Syndicat ITInternet http://www.syndicat.com/ ___ 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
Am Montag, 5. Dezember 2011, 11:37:46 schrieb Sareesh Sudhakaran: But I'm restricted by hosting options for Zope at the moment, and will revert to Python once the project is deployed - and when I figure out whether mySQL is good enough or not. I hate having to type all those extra characters in php though.sareesh If i talk about Zope / Python i mean Zope (with Zope Python Script Objects and/or external (Python) Methods). At a earlier stage Zope devels discussed for integrating ingres or another RDBMS natively into Zope - but this is not longer the case as there are many Zope adapters / integrations / products available for different major RDBMS like MySQL or Postgres. For the data structures where you have to handle large tables MySQL would be the first choice while oo data structures would preferrably go into your ZODB. I.e. we handle large amounts of user data records within MySQL while all of the web content objects or even complex shopping products are handled within ZODB - both within the same Shopping Cart application. This all depends highly from you data model. By theory you are able to handle both in just on of the DB solutions. With Zope you have many options to use external database solutions within your Zope based application. best regards, Niels. -- --- Niels Dettenbach Syndicat ITInternet http://www.syndicat.com/ signature.asc Description: This is a digitally signed message part. ___ 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 )
Re: [Zope] Help in deciding approach to Web App
Thanks AJ. I assumed an OODBMS would be the right choice because of the object nature of my 'tools'. Of course, it was an assumption. Instead of Pyramid+RDBMS, can I use PHP+mySQL (my current hosting provider supports this).If ZODB isn't for my project, then would a GraphDB help? I have no idea on where to start with Graph DB - I've read the wikis and it's made me more confused. -ss Date: Sun, 4 Dec 2011 08:40:28 +0100 From: li...@zopyx.com To: ays...@hotmail.com CC: zope@zope.org Subject: Re: [Zope] Help in deciding approach to Web App -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - From reading: your database model appears pretty much relational. Where would you take advantages from using Zope as framework? This sounds like a task for Pyramid + RDBMS or a graph DB. - -aj Sareesh Sudhakaran wrote: I have a personal project - a web application I wanted to develop - but I'm confused on which route to take. I am not under any time constraint. *About the App:* The best I can describe it is as a kind of expert system (but not AI) that needs to find the best workflow for a process, given a set of initial and final parameters. E.g. a 'capsule' of data must pass through many 'tools' or 'environments' to reach a desired output - something like a very complicated car wash. Let's say there are many tools that can be used at various stages in the process. I have estimated there are 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. Some of these tools are linked to each other - e.g if one tool is selected, there are only n tools that can correspond to it for the next step in the process. I also have the problem of 'matching' the tools for analysis. E.g. Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how I can construct a database without spelling out each number, as in the example above. The total number of tools needed for the process can be defined at the beginning, however, it will change as the application becomes more complex in the future. I plan to address every contingency in the process. The idea is - if the user inputs the initial parameters and the desired outcome (another set of parameters), the app must find the 'best' path - sort of like a decision tree. The best path can be the fastest, cheapest, etc. I would like the user to choose what is best for him/her. Unfortunately, parameters might change, relationships might change (but not regularly) - the 'rules' I will be using might be revised for better accuracy in prediction. I also need to track each user's path and solutions' for future reference (but no personal details except username and email address for logging in). Maybe when the app is up and running, I'd like to make it more democratic, with users contributing to refining the logic/rules involved. If possible, I would also like the app to output a graphical flowchart at the end showing the workflow with all tools grouped in an easy to understand layout. *My questions:* 1. Will the app be better served with a relational DB like mySQL or an Object database? After a lot of research I've guessed that my particular case might be better served with Python and Zope/ZODB. But I might be wrong? Maybe PHP+mySQL or Django is a better fit? 2. Can anyone provide general advice on how to go about beginning such a project in ZOPE. Which is the best place to start learning for a newbie? 3. Can anyone recommend a good shared hosting provider that supports Zope fully but is not expensive? 4. Is there a module or app that is open source that I can use to output a graphical flowchart based on the results, or will I be better served programming it from scratch with Python? I would appreciate any help in getting started. Thank you in advance. I have tried most online forums but have not good any productive answers. Most of the answers I got were pro-PHP+mySQL. Adam ___ 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 ) - -- ZOPYX Limited | zopyx group Charlottenstr. 37/1 | The full-service network for Zope Plone D-72070 Tübingen| Produce Publish www.zopyx.com | www.produce-and-publish.com - E-Publishing, Python, Zope Plone development, Consulting
Re: [Zope] Help in deciding approach to Web App
Thanks Niels. Just to clarify:Does my particular instance fall under an OODBMS model or a RDBMS model (with ORM if necessary)? I will begin by reading the Zope Book. Thanks for your assistance. Appreciate it. -ss Subject: Re: [Zope] Help in deciding approach to Web App From: n...@syndicat.com Date: Sun, 4 Dec 2011 09:24:10 +0100 To: ays...@hotmail.com; zope@zope.org -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Sareesh Sudhakaran ays...@hotmail.com schrieb: My questions:Will the app be better served with a relational DB like mySQL or an Object database? After a lot of research I've guessed that my particular case might be better served with Python and Zope/ZODB. But I might be wrong? Maybe PHP+mySQL or Django is a better fit?Can anyone provide general advice on how to go about beginning such a project in ZOPE. This hardly depends from your data structure, but with Zope you have the option to use ZODB and SQL DBs like MySQL in parallel. Typical relational data should go into a SQLDB while complex / oo Data structures should go into ZODB. We developed several complex to very complex web based applications - incl. expert systems - on Zope ZODB plus MySQL. I can't believe that someone would be able to solve such issues with PHP/SQL within the same time / ressources. Which is the best place to start learning for a newbie? You should start by trying the short zope practice / excercise as described in the Zope book. The Zope Book should be the best source for getting into Zope step by step from nothing. ß) Can anyone recommend a good shared hosting provider that supports Zope fully but is not expensive? Looking for zope hosting or similiar in google should advice you. Our company - as one of many - offers Zope hosting to. Is there a module or app that is open source that I can use to output a graphical flowchart based on the results, or will I be better served programming it from scratch with Python? There are different modules as i.e. Python Imaging (PIL) and higher level modules. I would appreciate any help in getting started. Thank you in advance. I have tried most online forums but have not good any productive answers. Most of the answers I got were pro-PHP+mySQL. Yes, because the peoples did not know anything other solution usually... cheers, Niels. - -- Niels Dettenbach Syndicat ITInternet http://www.syndicat.com -BEGIN PGP SIGNATURE- Version: APG v1.0.8 iIEEAREIAEEFAk7bLio6HE5pZWxzIERldHRlbmJhY2ggKFN5bmRpY2F0IElUJklu dGVybmV0KSA8bmRAc3luZGljYXQuY29tPgAKCRBU3ERlZRyiDUhlAJ4/XPl3Oet6 XN4UlkQ611FNoWqZCwCfZ1IPVjaLMD32wOlFE9cDnrm6bJQ= =ukyi -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help in deciding approach to Web App
On 12/04/2011 09:52 AM, Sareesh Sudhakaran wrote: Thanks Niels. Just to clarify: Does my particular instance fall under an OODBMS model or a RDBMS model (with ORM if necessary)? Data modelling is a bit of an art and probably you could tackle your problem with any approach. I think the important is for you to figure out which model suits more your personality. No kidding. I would personally start with the RDBMS approach considering only the information you provide. Also, you can easily use zope in combination with a RDBMS. When you read the book, beware that zope has been changing from a through the web approach, to a typical file system based approach, which is a loss, but it seems to be what suits the needs of the zope developers. The approach I use is: zpt page - (one) Python Script - (some) ZSQL Methods - MySQL The zpt defines the layout of the pages, the ZSQL Methods retrieve the data needed and the Python script massages the data to make it suitable for the ZPT page. Or the other way around, from user input in a form to storage in the database. The advantage of the relational approach is that it is a very well understood model and although different people will still come to different models there are sufficient objective guidelines out there (e.g., the normalization rules, and then criteria for when to denormalise) to help you along. Furthermore, there are lots of people in db-related forums that can help you. Also, RDBMS provides you with a standard query language, SQL, which plenty of systems and tools can use. In general, RDBMS gives you the safest approach to keep your data and not loose it when you need to migrate either the front-end or the back-end. This language is very powerful and can avoid you a lot of low level programming. However, plenty of people can not deal well with SQL because it follows a paradigm so different from the classic imperative programming. With SQL, you specify the what, with the other languages you specify the how. The advantage of the what is that you can do a lot of data processing in a few lines of code. The problem with the what is that because you don't know the how of it, you feel you don't have control and you are led to say the language is obscure or unreadable. However, even if you are not comfortable with the what (you have to try to know), you can still rely on an library like SQLAlchemy to keep you a bit in the comfort zone of the how. So instead of learning SQL, you need to learn the API of a specific library. Your choice. I recommend the first by far. The real main issue with Relational is that it is a highly structured data model. It allows you to keep high quality data but if you don't get it right soon enough in the development cycle, some later changes can have a huge impact in the application, requiring rewrites. Furthermore, it works the best when you have many objects with the same properties. If you have many entities all different from each other (the tools in your case, maybe), then maybe a OODBMS might be better. But here, there is no standard language, or standard whatever. Perosnally, I would avoid as much as possible to put data in something like ZODB (I use it merely to store and manage the application). The problem with your specific case is that it does not seem to be a typical case of books and authors, which might be a risk for someone without experience. The issue Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000, is indeed tricky. I suspect in general the needs of your system will be too specific to be able to rely only on SQL queries. You would need to put a lot of intelligence in the data (really highly structured) and it might become unmanageable or not scalable. I guess you will need to put a lot of intelligence in the Python Script. So, the ZSQL retrieves the relevant tool data and then makes the tool choice. The knowledge of the meaning of the attributes is maintained in programming. I should say I am not totally sure the Python Script is the best approach here, in terms of management facilities. But Python is surely a very good language due to its readability. However, you might need to use External methods or a more typical file-system based Python approach. Or maybe you actually need to create a Domain Specific Language to encode the intelligence needed for your tool selection process. If your python code becomes repetitive, with patterns showing up, then a DSL might be a good approach, but this might be too much engineering for you at this stage. It looks like you are in a typical CIM scenario and I remember handling a similar problem 20 years ago. I vaguely remember at that time to use custom graph structures in C and the the intelligence was coded in Lisp/Scheme. So, there is a big range of solutions to try out :) If you have time, then the simple approach zpt page - (one) Python
Re: [Zope] Help in deciding approach to Web App
Thanks Fernando! I really appreciate the time and effort you have put in answering my query. My personality sides with Python but my hosting provider does not support Django or Zope. 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? In the future I'll have to use either Python or C/C++ for my business logic and math. But the focus now is to get a prototype out, and if I'm doomed to change everything later I might as well start with the easiest and most obvious. Is this a viable starting point compared to what you have suggested? Or am I missing something? -Sareesh Date: Sun, 4 Dec 2011 13:28:36 +0100 From: ferna...@cmartins.nl To: ays...@hotmail.com CC: n...@syndicat.com; zope@zope.org Subject: Re: [Zope] Help in deciding approach to Web App On 12/04/2011 09:52 AM, Sareesh Sudhakaran wrote: Thanks Niels. Just to clarify: Does my particular instance fall under an OODBMS model or a RDBMS model (with ORM if necessary)? Data modelling is a bit of an art and probably you could tackle your problem with any approach. I think the important is for you to figure out which model suits more your personality. No kidding. I would personally start with the RDBMS approach considering only the information you provide. Also, you can easily use zope in combination with a RDBMS. When you read the book, beware that zope has been changing from a through the web approach, to a typical file system based approach, which is a loss, but it seems to be what suits the needs of the zope developers. The approach I use is: zpt page - (one) Python Script - (some) ZSQL Methods - MySQL The zpt defines the layout of the pages, the ZSQL Methods retrieve the data needed and the Python script massages the data to make it suitable for the ZPT page. Or the other way around, from user input in a form to storage in the database. The advantage of the relational approach is that it is a very well understood model and although different people will still come to different models there are sufficient objective guidelines out there (e.g., the normalization rules, and then criteria for when to denormalise) to help you along. Furthermore, there are lots of people in db-related forums that can help you. Also, RDBMS provides you with a standard query language, SQL, which plenty of systems and tools can use. In general, RDBMS gives you the safest approach to keep your data and not loose it when you need to migrate either the front-end or the back-end. This language is very powerful and can avoid you a lot of low level programming. However, plenty of people can not deal well with SQL because it follows a paradigm so different from the classic imperative programming. With SQL, you specify the what, with the other languages you specify the how. The advantage of the what is that you can do a lot of data processing in a few lines of code. The problem with the what is that because you don't know the how of it, you feel you don't have control and you are led to say the language is obscure or unreadable. However, even if you are not comfortable with the what (you have to try to know), you can still rely on an library like SQLAlchemy to keep you a bit in the comfort zone of the how. So instead of learning SQL, you need to learn the API of a specific library. Your choice. I recommend the first by far. The real main issue with Relational is that it is a highly structured data model. It allows you to keep high quality data but if you don't get it right soon enough in the development cycle, some later changes can have a huge impact in the application, requiring rewrites. Furthermore, it works the best when you have many objects with the same properties. If you have many entities all different from each other (the tools in your case, maybe), then maybe a OODBMS might be better. But here, there is no standard language, or standard whatever. Perosnally, I would avoid as much as possible to put data in something like ZODB (I use it merely to store and manage the application). The problem with your specific case is that it does not seem to be a typical case of books and authors, which might be a risk for someone without experience. The issue Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000, is indeed tricky. I suspect in general the needs of your system will be too specific to be able to rely only on SQL queries. You would need to put a lot
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
Aloha, Very briefly, from what you describe, it looks like you are dealing with large numbers of complex objects (your 'tools') that interact with each other - and with some other elements that are going through this workflow process? And a context for the process? ...not sure of that part... 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. Python is one reasonable language option; zope for the web publishing aspect of the project would fit well with that. I haven't worked with other OO languages enough to usefully compare. It also sounds to me like the web publishing is the lesser part of this...? That is, the workflow of interacting tools is the real 'app' here, a process which does not all get shown somehow on a web page...or does it? Or just the outcomes? LAMP platform is so common and cheap that it's all a lot of people know about. It can be used well, and, it is all too easy to make horrible hacks and Frankestein monster apps in PHP/MySQL. Meaning, a highly structured (yet powerful) OO programming language will support you in avoiding that. Also, for development (or just to explore if python+zope might meet your needs) you don't need any hosting, you can install python+zope on your development system and try it out. best wishes... John S. On 12/03/2011 07:12 PM, Sareesh Sudhakaran wrote: I have a personal project - a web application I wanted to develop - but I'm confused on which route to take. I am not under any time constraint. *About the App:* The best I can describe it is as a kind of expert system (but not AI) that needs to find the best workflow for a process, given a set of initial and final parameters. E.g. a 'capsule' of data must pass through many 'tools' or 'environments' to reach a desired output - something like a very complicated car wash. Let's say there are many tools that can be used at various stages in the process. I have estimated there are 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. Some of these tools are linked to each other - e.g if one tool is selected, there are only n tools that can correspond to it for the next step in the process. I also have the problem of 'matching' the tools for analysis. E.g. Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how I can construct a database without spelling out each number, as in the example above. The total number of tools needed for the process can be defined at the beginning, however, it will change as the application becomes more complex in the future. I plan to address every contingency in the process. The idea is - if the user inputs the initial parameters and the desired outcome (another set of parameters), the app must find the 'best' path - sort of like a decision tree. The best path can be the fastest, cheapest, etc. I would like the user to choose what is best for him/her. Unfortunately, parameters might change, relationships might change (but not regularly) - the 'rules' I will be using might be revised for better accuracy in prediction. I also need to track each user's path and solutions' for future reference (but no personal details except username and email address for logging in). Maybe when the app is up and running, I'd like to make it more democratic, with users contributing to refining the logic/rules involved. If possible, I would also like the app to output a graphical flowchart at the end showing the workflow with all tools grouped in an easy to understand layout. *My questions:* 1. Will the app be better served with a relational DB like mySQL or an Object database? After a lot of research I've guessed that my particular case might be better served with Python and Zope/ZODB. But I might be wrong? Maybe PHP+mySQL or Django is a better fit? 2. Can anyone provide general advice on how to go about beginning such a project in ZOPE. Which is the best place to start learning for a newbie? 3. Can anyone recommend a good shared hosting provider that supports Zope fully but is not expensive? 4. Is there a module or app that is open source that I can use to output a graphical flowchart based on the results, or will I be better served programming it from scratch with Python? I would appreciate any help in getting started. Thank you in advance. I have tried most online forums but have not good any productive answers. Most of the answers I got were pro-PHP+mySQL. Adam ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related
Re: [Zope] Help in deciding approach to Web App
Thanks Fernando. I would choose ZOPE or Django and a new provider at the drop of a hat - if someone can confirm if that's the way to go. However, since, there are too many grey areas, it might be better if I stuck to what I have and see how things turn out. Once again, thanks for your support. Appreciate it! - Sareesh Date: Sun, 4 Dec 2011 18:19:25 +0100 From: ferna...@cmartins.nl To: ays...@hotmail.com CC: n...@syndicat.com; zope@zope.org Subject: 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 )
[Zope] Help in deciding approach to Web App
I have a personal project - a web application I wanted to develop - but I'm confused on which route to take. I am not under any time constraint. About the App:The best I can describe it is as a kind of expert system (but not AI) that needs to find the best workflow for a process, given a set of initial and final parameters. E.g. a 'capsule' of data must pass through many 'tools' or 'environments' to reach a desired output - something like a very complicated car wash.Let's say there are many tools that can be used at various stages in the process. I have estimated there are 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. Some of these tools are linked to each other - e.g if one tool is selected, there are only n tools that can correspond to it for the next step in the process. I also have the problem of 'matching' the tools for analysis. E.g. Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how I can construct a database without spelling out each number, as in the example above.The total number of tools needed for the process can be defined at the beginning, however, it will change as the application becomes more complex in the future. I plan to address every contingency in the process. The idea is - if the user inputs the initial parameters and the desired outcome (another set of parameters), the app must find the 'best' path - sort of like a decision tree. The best path can be the fastest, cheapest, etc. I would like the user to choose what is best for him/her.Unfortunately, parameters might change, relationships might change (but not regularly) - the 'rules' I will be using might be revised for better accuracy in prediction.I also need to track each user's path and solutions' for future reference (but no personal details except username and email address for logging in). Maybe when the app is up and running, I'd like to make it more democratic, with users contributing to refining the logic/rules involved.If possible, I would also like the app to output a graphical flowchart at the end showing the workflow with all tools grouped in an easy to understand layout. My questions:Will the app be better served with a relational DB like mySQL or an Object database? After a lot of research I've guessed that my particular case might be better served with Python and Zope/ZODB. But I might be wrong? Maybe PHP+mySQL or Django is a better fit?Can anyone provide general advice on how to go about beginning such a project in ZOPE. Which is the best place to start learning for a newbie? Can anyone recommend a good shared hosting provider that supports Zope fully but is not expensive? Is there a module or app that is open source that I can use to output a graphical flowchart based on the results, or will I be better served programming it from scratch with Python?I would appreciate any help in getting started. Thank you in advance. I have tried most online forums but have not good any productive answers. Most of the answers I got were pro-PHP+mySQL. Adam ___ 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
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - From reading: your database model appears pretty much relational. Where would you take advantages from using Zope as framework? This sounds like a task for Pyramid + RDBMS or a graph DB. - -aj Sareesh Sudhakaran wrote: I have a personal project - a web application I wanted to develop - but I'm confused on which route to take. I am not under any time constraint. *About the App:* The best I can describe it is as a kind of expert system (but not AI) that needs to find the best workflow for a process, given a set of initial and final parameters. E.g. a 'capsule' of data must pass through many 'tools' or 'environments' to reach a desired output - something like a very complicated car wash. Let's say there are many tools that can be used at various stages in the process. I have estimated there are 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. Some of these tools are linked to each other - e.g if one tool is selected, there are only n tools that can correspond to it for the next step in the process. I also have the problem of 'matching' the tools for analysis. E.g. Tool A might have only three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how I can construct a database without spelling out each number, as in the example above. The total number of tools needed for the process can be defined at the beginning, however, it will change as the application becomes more complex in the future. I plan to address every contingency in the process. The idea is - if the user inputs the initial parameters and the desired outcome (another set of parameters), the app must find the 'best' path - sort of like a decision tree. The best path can be the fastest, cheapest, etc. I would like the user to choose what is best for him/her. Unfortunately, parameters might change, relationships might change (but not regularly) - the 'rules' I will be using might be revised for better accuracy in prediction. I also need to track each user's path and solutions' for future reference (but no personal details except username and email address for logging in). Maybe when the app is up and running, I'd like to make it more democratic, with users contributing to refining the logic/rules involved. If possible, I would also like the app to output a graphical flowchart at the end showing the workflow with all tools grouped in an easy to understand layout. *My questions:* 1. Will the app be better served with a relational DB like mySQL or an Object database? After a lot of research I've guessed that my particular case might be better served with Python and Zope/ZODB. But I might be wrong? Maybe PHP+mySQL or Django is a better fit? 2. Can anyone provide general advice on how to go about beginning such a project in ZOPE. Which is the best place to start learning for a newbie? 3. Can anyone recommend a good shared hosting provider that supports Zope fully but is not expensive? 4. Is there a module or app that is open source that I can use to output a graphical flowchart based on the results, or will I be better served programming it from scratch with Python? I would appreciate any help in getting started. Thank you in advance. I have tried most online forums but have not good any productive answers. Most of the answers I got were pro-PHP+mySQL. Adam ___ 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 ) - -- ZOPYX Limited | zopyx group Charlottenstr. 37/1 | The full-service network for Zope Plone D-72070 Tübingen| Produce Publish www.zopyx.com | www.produce-and-publish.com - E-Publishing, Python, Zope Plone development, Consulting -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJO2yPrAAoJEADcfz7u4AZjnJULviZSrj8nLwzeqjgxGT+d9/aU 1x0bj/E3zuPFeKtWkevp26K4OiCe/yw7PmgVXh1xBbfLhFzUcet9Ubdu0eIjfE/8 dC8hayQf4fR8KD3J06CbkMAEJsJur3gTPoFxzDWd7S9ybwuFjb3E14AhiQGPpdYN DVwE6U3t240Wj7ebNTblASQnvI2sfzr9r2tYVqZc8O+SMyROL1oIs56RNofT4pz5 p9OXiYlnHmn1keCbEKnYk1e2zTU7kFJdGQz/Uy+yV4QTiU7nMwhxWCx1gBKxVgNk XseqPdWKl9epz/h1Pb0qPTvK6PXl46Cj/0Bls/XU6yHDDpB49SqMXai2i6VIAzdL lik6JwSPVxBv24eTngrisx2qvhl1ln63EM+AWwky7jUgNl0cwALNdR3Gj+zDVioc ZWAZfWcuI3TFKYpwJiwzNgT0DSbOLvlM/09xXPsxmE+rfXT8arTxMSEgaQS60LqJ
Re: [Zope] help with running a dtml method
Dvir Bar-lev wrote at 2009-3-26 10:12 +0200: I have a site with the following folder structure in zope: Dvir WebSite contentPages I have and index_html in the WebSite folder, in it I call a dtml method that's in the contentPages folder named overview_html, in the same folder (content Pages) I have another dtml_method named time_combo. In the overview_html I try to call the time combo method - I tried: dtml-var time_combo But it keeps saying it has an error : Error Type: NameError Error Value: name 'time_combo' is not defined Unlike a DTMLDocument, a DTMLMethod does not change the context from name lookup. Depending on how you call the method you may even loose all context. To learn more about DMTL calling, read http://www.handshake.de/~dieter/pyprojects/zope/book/chap3.html#c37ac15c14b5 -- Dieter ___ 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] help with running a dtml method
Hi I have a site with the following folder structure in zope: Dvir WebSite contentPages I have and index_html in the WebSite folder, in it I call a dtml method that's in the contentPages folder named overview_html, in the same folder (content Pages) I have another dtml_method named time_combo. In the overview_html I try to call the time combo method - I tried: dtml-var time_combo But it keeps saying it has an error : Error Type: NameError Error Value: name 'time_combo' is not defined I tried putting the full path like this: dtml-var expr=Dvir http://10.101.1.106:8080/Dvir/manage_workspace .WebSite http://10.101.1.106:8080/Dvir/WebSite/manage_workspace .contentPages http://10.101.1.106:8080/Dvir/WebSite/contentPages/manage_workspace .time_combo() But it still won't work. Any idea what I did wrong? And what do I need to do to be able to call it? ___ 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 with my first steps
deconya wrote at 2009-2-20 15:14 +0100: Im new in this list and I need help for my first steps. Im received a server with zope installed to administer 3 webs but one has the problem that fails the configuration to establish the initial page. I fear you need some background reading to understand how Zope works. The Zope Book, 2.7 edition, on http://plope.org; may be a good starting point. After you skimmed the book, come back if questions remain. -- Dieter ___ 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] Help with my first steps
Hi Im new in this list and I need help for my first steps. Im received a server with zope installed to administer 3 webs but one has the problem that fails the configuration to establish the initial page. Im searching where you can configure to publish the webs but I could see the process to publish but no where you can put the initial page inside zope. Im sure the question es stupid but I need to resolve urgently this problem and Im not pacience to read all the manual. Someone can help me? Thanks and Best regards ___ 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 with my first steps
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20.02.2009 15:14 Uhr, deconya wrote: Hi Im new in this list and I need help for my first steps. Im received a server with zope installed to administer 3 webs but one has the problem that fails the configuration to establish the initial page. Im searching where you can configure to publish the webs but I could see the process to publish but no where you can put the initial page inside zope. Im sure the question es stupid but I need to resolve urgently this problem and Im not pacience to read all the manual. Someone can help me? This description is pretty poor. In general: the mapping of domains - Zope host/port is known as virtual hosting and usually configured through rewrite rules or something similar within your front-end proxy (Apache, Squid friends) - or old fashioned through settings within the instance of the virtual host monster somewhere in the root of the ZMI. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkmevB8ACgkQCJIWIbr9KYycrwCgm4piV8PUjha0xmDSMxkDXcg0 9cEAnRexKgl/Ti2OX8CfCYvGRDnTH/DJ =ujHA -END PGP SIGNATURE- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ 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 debugging a can't pickle error deep within a catalog reindex
Rob Miller wrote at 2008-6-17 15:47 -0700: ... Traceback (most recent call last): /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/serialize.py, line 407, in serialize return self._dump(meta, obj.__getstate__()) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/serialize.py, line 416, in _dump self._p.dump(state) File copy_reg.py, line 69, in _reduce_ex raise TypeError, can't pickle %s objects % base.__name__ TypeError: can't pickle instancemethod objects Reproduce the problem in an interactive Python interpreter (bin/zopectl debug on *nix; alternatives for Win*). Call pdb.pm() (or probably better dm.pdb.zpdb.pm() (dm.pdb can be found on PyPI)) and go up two call frames. Look at obj. With a bit of looks, you see which objects this is and where it comes from. -- Dieter ___ 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] help debugging a can't pickle error deep within a catalog reindex
hi, i'm trying to perform a ZCatalog.refreshCatalog() on a catalog with over 29,000 indexed objects. it churns for a good long time, and eventually fails with a long set of tracebacks, of which i've included a sample at the end of this message. i think i understand the gist of the issue... it's trying to write an object (probably a CatalogBrain) to the database, but this object's __dict__ contains a value that is of type instancemethod, which isn't allowed for persistent objects. the problem is that i can't figure out which specific objects are causing the problem. i've used pdb.post_mortem to get a debug prompt way down in the traceback, but the code goes in and out of C modules, so i'm missing a lot of what's happening. and when i interactively peek at the objects that are being indexed when the error happens, there doesn't seem to be anything wrong, and i can index the objects w/ no problem. i've even tried dropping the subtransaction threshold down to 1, so it will try to commit a savepoint after every object, but none of the objects being indexed seemed to have any problems. i CAN verify that the instancemethod that is causing the problem renders like this: bound method SessionDataManager.getSessionData of SessionDataManager at /session_data_manager even that hasn't proven enough for me to concretely identify the source of the problem, though. i've been working on this for a full day already, and am not sure how to proceed. does anyone have any debugging tips that might help me figure out what, exactly, is causing the reindex attempts to blow up? thanks! -r Traceback (most recent call last): File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/Products/ZCatalog/ZCatalog.py, line 296, in refreshCatalog self.catalog_object(obj, p, pghandler=pghandler) File /home/rob/topp/14000/builds/20080611/opencore/zope/Products/CMFPlone/CatalogTool.py, line 367, in catalog_object self._increment_counter() File /home/rob/topp/14000/builds/20080611/opencore/zope/Products/CMFPlone/CatalogTool.py, line 395, in _increment_counter self._counter.change(1) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/BTrees/Length.py, line 55, in change self.value += delta File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/Connection.py, line 890, in register self._register(obj) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/Connection.py, line 900, in _register self.transaction_manager.get().join(self) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/transaction/_transaction.py, line 273, in join self._prior_operation_failed() # doesn't return File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/transaction/_transaction.py, line 267, in _prior_operation_failed raise TransactionFailedError(An operation previously failed, TransactionFailedError: An operation previously failed, with traceback: File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZServer/PubCore/ZServerPublisher.py, line 25, in __init__ response=b) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py, line 401, in publish_module environ, debug, request, response) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py, line 202, in publish_module_standard response = publish(request, module_name, after_list, debug=debug) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py, line 119, in publish request, bind=1) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply if debug is not None: return debug(object,args,context) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py, line 42, in call_object result=apply(object,args) # Type scr to step into published object. File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/Products/ZCatalog/ZCatalog.py, line 260, in manage_catalogReindex self.refreshCatalog(clear=1, pghandler=handler) File /home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/Products/ZCatalog/ZCatalog.py, line 296, in refreshCatalog self.catalog_object(obj, p, pghandler=pghandler) File /home/rob/topp/14000/builds/20080611/opencore/zope/Products/CMFPlone/CatalogTool.py, line 385, in catalog_object update_metadata, pghandler=pghandler) File /home/rob/topp/14000/builds/20080611/opencore/zope/Products/CacheSetup/patch.py, line 96, in catalog_object uid, idxs, update_metadata, pghandler) File /home/rob/topp/14000/builds/20080611/opencore/zope/Products/CacheSetup/patch_utils.py, line 6, in call return getattr(self, PATTERN % __name__)(*args, **kw) File
Re: [Zope] Help writing test where bobobase_modification_time changes
Thanks for the tips Chris and Dieter, I actually solved it in a very simple way: from OFS.Image import File from time import time class MockFile(File): This file works the same as a normal File expect that in manage_edit() the internal modification time is set immediately. Normally Zope objects get their internal modification set when the transaction manager commits. def manage_edit(self, title, content_type, precondition='', filedata=None, REQUEST=None): # here's the mock hack, we set the _p_mtime NOW instead of letting # the transaction manager do it at the end. self._p_mtime = time() return File.manage_edit(self, title, content_type, precondition=precondition, filedata=filedata, REQUEST=REQUEST) This worked beautifully in the integration test. I'm happy. On 10/04/2008, Chris Withers [EMAIL PROTECTED] wrote: Peter Bengtsson wrote: How can I solve this? Make one big transaction two without having to use transaction.get().commit() which I don't think I can use in unit tests as per Dieter's advice. I'd suggest monkeypatching bobobase_modification_time on the objects you're testing with. You're testing your cache code, not the implementation of those objects, so replacing them with (partially) dummy objects is great for avoiding this kind of problem and is a pattern I've used frequently... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ 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 writing test where bobobase_modification_time changes
Peter Bengtsson wrote: How can I solve this? Make one big transaction two without having to use transaction.get().commit() which I don't think I can use in unit tests as per Dieter's advice. I'd suggest monkeypatching bobobase_modification_time on the objects you're testing with. You're testing your cache code, not the implementation of those objects, so replacing them with (partially) dummy objects is great for avoiding this kind of problem and is a pattern I've used frequently... 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 )
Re: [Zope] Help writing test where bobobase_modification_time changes
Peter Bengtsson wrote at 2008-4-8 19:08 +0100: ... The reason it fails on the last line is that the time difference between the first time and the second time is nil. Adding a time.sleep(1) won't change anything because the bobobase_modification_time() doesn't change. How can I solve this? Not easy. bobobase_modification_time() is in fact a DateTime representation of _p_serial. And _p_serial is the transaction id (also a timestamp) that has committed the object state belonging to this object incarnation. Unfortunately, you must not commit a transaction in a test suite (as this may cause interference with other tests). There is a small chance that a savepoint changed _p_serial -- but the chance is only small... You might be able to write _p_serial yourself and thereby trick bobobase_modification_time(). -- Dieter ___ 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] Help writing test where bobobase_modification_time changes
I'll try to explain as briefly as possible. I've got a working cache pattern that keeps a cached version of a Zope file's content and only when it changes (by bobobase_modification_time) the cache is invalidated and recreated. Here's the gist of my test class Test(ZopeTestCase.FunctionalTestCase): def test_recreateCache(self): bla self.folder.manage_addFile('foo.js','FOO data') url = self.folder.mytool.cacheFile('foo.js') # pseudo code this time path = urlparse(url)[2] response = self.publish(path) self.assert... tests on response... _file = getattr(self.folder, 'foo.js') _file.manage_edit(_file.title, _file.content_type, filedata='new data') newurl = self.folder.mytool.cacheFile('foo.js') assert newurl != url, url hasn't changed :( The reason it fails on the last line is that the time difference between the first time and the second time is nil. Adding a time.sleep(1) won't change anything because the bobobase_modification_time() doesn't change. How can I solve this? Make one big transaction two without having to use transaction.get().commit() which I don't think I can use in unit tests as per Dieter's advice. Grateful for help. Peter -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ 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 with customizing error messages, Zope 2.9
Dennis Allison wrote at 2007-9-20 09:37 -0700: ... standard_error_message should be acquired. It should be possible for there to be multiple copies with the particular one to be used selected by acquisition. This does not appear to be the case for some errors in my configuration, but I am not sure why. You are right -- and I can explain why. There appears to be nothing in the Zope 2.9 zope.conf file that has to do with catching error messages. Is there some configuration that is missing to enable full custom error messages. Looking at the code: ZPublisher/HTTPResponse.py seems to have a complete set of error responses hard-wired with outputs that mimic those of the default standard_error_message. OFS/SimpleItem.py includes a method called raise_standardErrorMessage which first acquires and then publishes the standard_error_message. Zope2/App/startup.py has a method, zpublisher_exception_hook which uses raise_standardErrorMessage and is referenced in ZPublisher/Publish.py where it is used to set error_hook, but error_hook does not appear to be used. It would be helpful to me if someone who understands how this particular code works could provide some hints as to what's needed to fully customize the error message responses. We start with ZPublisher. It is this component that catches the exception and activate error handling. ZPublisher was designed as a general publication component -- to be used not only for Zope. Therefore, it has neither error handling nor transaction handling nor a few other things hard coded. Instead, it gets a module name and determines the relevant pieces by a call to ZPublisher.Publish.get_module_info(module_name). When ZPublisher is used for Zope, then module_name is Zope2. Zope2 defines Zope2.zpublisher_exception_hook as its exception hook (which does the error handling). The true zpublisher_exception_hook is defined (as you found out) in Zope2.App.startup and copied to Zope2 by the _startup call. When ZPublisher catches an exception, it calls the error hook with parents[0] (the last or second to last object traversed to), the request and the error information. zpublisher_exception_hook then looks in the acquisition context of parents[0] for 'raise_standardErrorMessage' and 'standard_error_message'. If either of them is not found, the exception is raised -- and handled by the response object in a standard (minimal) way. Otherwise, 'raise_standardErrorMessage(standard_error_message, ...)' is called. The problem which sometimes causes surprises with respect to the used 'standard_error_message' lies in parents[0]: When the exception happens during traversal, then parents[0] is not the object you may expect -- but lies above the expected object. The problem is especially bad when the exception is raised by request.processInputs. In this case, the traversal did not even start and parents[0] is the root object. Consequently, for these exceptions, you will always get the standard_error_message from your root folder -- even when the request was targeted to some object deep inside your site. processInputs may raise exceptions when you use e.g. ZPublisher type conversions, e.g. :int or :float and the provided value cannot be converted. If you do not like this, you should not use ZPublisher type conversions. -- Dieter ___ 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] Help raise Open Source visibility in the government area
Hi, ( If you have already received this email and have voted, thank you ! ) ( If you have not voted, and wanted to, this is a nice reminder. ) ( If you do not wish to vote, sorry for the noise. ) Please take 10 minutes to help raise open source profile in the government area by voting for the PloneGov project at the european egov awards. See below what PloneGov is and why you could vote to support open source even if you do not use Plone. Anyone from any country can vote, you don't have to live in the EU. And please vote *now*, the deadline is almost upon us **SEPTEMBER 7** — you are likely to forget if you don't set aside 10 minutes now. This process is unfortunately a bit involved — since we're dealing with governments — but shouldn't take longer than 10 minutes to complete. Step-by-step: 1. Go to http://www.epractice.eu/register 2. Wait for the email confirmation and log in. 3. Fill out your profile: http://www.epractice.eu/myprofile/personal http://www.epractice.eu/myprofile/professional http://www.epractice.eu/myprofile/contact (If you don't want to provide professional info, we suggest you add I just want to vote in the required fields) 4. Vote for PloneGov by clicking here: http://www.epractice.eu/do/voteinspiring/1026 Thanks! More information below, if you're interested in what PloneGov is. _ What is PloneGov? PloneGov aims to create a collaborative software ecosystem where governmental organizations work together, in close relationship with SMEs, to share the cost of software development and enhanced capabilities. This new initiative started by small towns now reaches all levels of public administration and spans over 13 countries on 3 continents. http://www.plonegov.org Your vote for the Most innovative good practice award is a unique opportunity to reach politicians and decision makers. Winning this award will highlight the maturity achieved by the Open Source collaborative model as a pragmatic way to tackle IT challenges in society. You may vote until Friday, September 7th. The Public Sector has an important influence on many sectors of society. A wider Open Source acceptance in this field is strategic to all Open Source users and advocates. Users in sectors such as Education, NGOs and businesses would directly benefit from broader adoption. It would result in a growing pool of available software, tools, and developers. Beyond the practical example of PloneGov, your vote contributes to support Open Source values that are based on collaboration, openness and fair trade. It is an opportunity to support Open Source as an innovative model of IT development in which the Public Sector, NGOs and Education can work together and all of society will benefit. -- Godefroid Chapelle (aka __gotcha)- BubbleNet http://bubblenet.be ___ 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] help with zodb server
Hi, I installed ZODB3-3.3.1. Problem is server says it starts, but is not there. I can understand what is happening. Please help! [root]# /usr/bin/zdctl.py -C /etc/zeoctl.conf start . . . . . . . . . . . daemon process started, pid=27100 [root]# /usr/bin/zdctl.py -C /etc/zeoctl.conf status daemon manager running; daemon process not running There is no activity in the log file Here is the info with show schemafile: '/usr/lib/python2.4/site-packages/zdaemon/schema.xml' configfile: '/etc/zeoctl.conf' interactive: None default_to_interactive: True zdrun:'/usr/bin/zdrun.py' python: '/usr/bin/python' program: ['/usr/bin/runzeo.py', '-C', '/etc/zeo.config'] backofflimit: 10 daemon: True forever: False sockname: '/soft/zeohome/zdsock' exitcodes:[0, 2] user: None umask:022 directory:'/soft/zeohome' logfile: None hang_around: False Also, when I try another method, I get error [EMAIL PROTECTED] tmp]# runzeo.py -a 127.0.0.1:9675 -f /soft/zeotmp/Data.fs Error: invalid value for -f '/soft/zeotmp/Data.fs': bad marshal data For help, use /usr/bin/runzeo.py -h Question: Who should own the directories and the Data.fs? Thank you very much! Regards, Nagaraj -- +--+--+ Nagaraj Panyam | Office tel: +91-22-22782610 Dept of High Energy Physics| Office fax: +91-22-22804610 Tata Instt. of Fundamental Research| Home tel : +91-22-22804936 Mumbai - 400 005, INDIA| **Email** : [EMAIL PROTECTED] +--+--+ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help with DateTime.earliestTime()
Eric Thomas wrote at 2007-8-25 07:18 -0500: I've been having a site problem that I've tracked down to DateTime. Simply enough, the code snippets below both try to add 31 days to the first day in October. I'm expecting this to result in the first day of November. Good Example: from DateTime import DateTime start=DateTime('2005/10/01 01:00:00 GMT-5') print start 2005/10/01 01:00:00 GMT-5 earlyStart=start.earliestTime() print earlyStart 2005/10/01 print earlyStart+31 2005/11/01 Bad Example: (Here's the problem) from DateTime import DateTime start=DateTime('2005/10/01 01:00:00 US/Central') print start 2005/10/01 01:00:00 US/Central earlyStart=start.earliestTime() print earlyStart 2005/10/01 print earlyStart+31 2005/10/31 23:00:00 US/Central I've confirmed this occurs with several of the US/ timezones (US/Pacific, US/Alaska, etc) This looks like a daytime saving problem: With daytime saving, the clock often is put back for an hour at the last samday in october The DateTime implementation could avoid this *if* the arithmetic would only accept int (then it would be very likely that you only want to modify the day but not hours, minutes and seconds). But the arithmetic accepts float and that necessitates some surprises with time discontinuities (such as daytime saving switches). Can anyone help me figure out why the resulting date is coming up 1 hour short of the expected 2005/11/01 ? Thanks! Eric divI#39;ve been having a site problem that I#39;ve tracked down to DateTime.nbsp; Simply enough, the code snippets below both try to add 31 days to the first day in October.nbsp; I#39;m expecting this to result in the first day of November. /div divnbsp;/div divGood Example:/div div pgt;gt;gt; from DateTime import DateTimebrgt;gt;gt; start=DateTime(#39;2005/10/01 01:00:00 GMT-5#39;)brgt;gt;gt; print startbr2005/10/01 01:00:00 GMT-5brgt;gt;gt; earlyStart=start.earliestTime()br gt;gt;gt; print earlyStartbr2005/10/01brgt;gt;gt; print earlyStart+31br2005/11/01/p/div div pBad Example:nbsp; (Here#39;s the problem)/p pgt;gt;gt; from DateTime import DateTimebrgt;gt;gt; start=DateTime(#39;2005/10/01 01:00:00 US/Central#39;)brgt;gt;gt; print startbr2005/10/01 01:00:00 US/Centralbrgt;gt;gt; earlyStart=start.earliestTime ()brgt;gt;gt; print earlyStartbr2005/10/01brgt;gt;gt; print earlyStart+31br2005/10/31 23:00:00 US/Central/p pI#39;ve confirmed this occurs with several of the US/ timezones (US/Pacific, US/Alaska, etc)/p pCan anyone help me figure out why the resulting date is coming up 1 hour short of the expected 2005/11/01 ?/p pThanks!/p pEric/p pnbsp;/p pnbsp;/p/div -- Dieter ___ 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] Help with DateTime.earliestTime()
I've been having a site problem that I've tracked down to DateTime. Simply enough, the code snippets below both try to add 31 days to the first day in October. I'm expecting this to result in the first day of November. Good Example: from DateTime import DateTime start=DateTime('2005/10/01 01:00:00 GMT-5') print start 2005/10/01 01:00:00 GMT-5 earlyStart=start.earliestTime() print earlyStart 2005/10/01 print earlyStart+31 2005/11/01 Bad Example: (Here's the problem) from DateTime import DateTime start=DateTime('2005/10/01 01:00:00 US/Central') print start 2005/10/01 01:00:00 US/Central earlyStart=start.earliestTime() print earlyStart 2005/10/01 print earlyStart+31 2005/10/31 23:00:00 US/Central I've confirmed this occurs with several of the US/ timezones (US/Pacific, US/Alaska, etc) Can anyone help me figure out why the resulting date is coming up 1 hour short of the expected 2005/11/01 ? Thanks! Eric ___ 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 with DateTime.earliestTime()
--On 25. August 2007 07:18:42 -0500 Eric Thomas [EMAIL PROTECTED] wrote: I've been having a site problem that I've tracked down to DateTime. Simply enough, the code snippets below both try to add 31 days to the first day in October. I'm expecting this to result in the first day of November. Likely because the timezone support is known to be partly broken (since ages). -aj pgprmA5T8AN1C.pgp Description: PGP signature ___ 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 with DateTime.earliestTime()
- Original Message - From: Eric Thomas [EMAIL PROTECTED] To: zope@zope.org Sent: Saturday, August 25, 2007 8:18 AM Subject: [Zope] Help with DateTime.earliestTime() I've been having a site problem that I've tracked down to DateTime. Simply enough, the code snippets below both try to add 31 days to the first day in October. I'm expecting this to result in the first day of November. Good Example: from DateTime import DateTime start=DateTime('2005/10/01 01:00:00 GMT-5') print start 2005/10/01 01:00:00 GMT-5 earlyStart=start.earliestTime() print earlyStart 2005/10/01 print earlyStart+31 2005/11/01 Bad Example: (Here's the problem) from DateTime import DateTime start=DateTime('2005/10/01 01:00:00 US/Central') print start 2005/10/01 01:00:00 US/Central earlyStart=start.earliestTime() print earlyStart 2005/10/01 print earlyStart+31 2005/10/31 23:00:00 US/Central I've confirmed this occurs with several of the US/ timezones (US/Pacific, US/Alaska, etc) Can anyone help me figure out why the resulting date is coming up 1 hour short of the expected 2005/11/01 ? I don't know what your problem is, but here are some code snippets I used to get around a timezone problem I was having: # def custom timezone class class LocalTimezone(datetime.tzinfo): def utcoffset(self, dt): STDOFFSET = datetime.timedelta(seconds = -_time.timezone) ZERO = datetime.timedelta(0) if _time.daylight: DSTOFFSET = datetime.timedelta(seconds = -_time.altzone) else: DSTOFFSET = STDOFFSET if self._isdst(dt): return DSTOFFSET else: return STDOFFSET def dst(self, dt): STDOFFSET = datetime.timedelta(seconds = -_time.timezone) ZERO = datetime.timedelta(0) if _time.daylight: DSTOFFSET = datetime.timedelta(seconds = -_time.altzone) else: DSTOFFSET = STDOFFSET if self._isdst(dt): DSTDIFF = DSTOFFSET - STDOFFSET return DSTDIFF else: return ZERO def tzname(self, dt): return _time.tzname[self._isdst(dt)] def _isdst(self, dt): tt = (dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.weekday(), 0, -1) stamp = _time.mktime(tt) tt = _time.localtime(stamp) return tt.tm_isdst 0 # usage code... Local = LocalTimezone() chkDate = datetime.datetime.now(Local) now = datetime.datetime.now(Local) # see if we have to apply a local timezone offset if tzo: # get the number of hours less than UTC (GMT) localTZO = int(chkDate.strftime('%z')[0:-2]) # make sure we have the target tzo as an integer targetTZO = int(tzo) diffTZO = 0 if targetTZO localTZO: diffTZO = -(-targetTZO + localTZO) elif targetTZO localTZO: diffTZO = (-localTZO + targetTZO) if diffTZO: # we have to adjust our dates to account for the time zone difference chkDate = chkDate + datetime.timedelta(hours=diffTZO) now = now + datetime.timedelta(hours=diffTZO) # create a time delta object (a date/time object that is a duration) for 6 months maxDate = datetime.timedelta(weeks=24) # check for events within a 6 month window while chkDate now + maxDate: This code was just ripped from an application, but may provide you with some ideas for a work-around. Good luck! Jonathan ___ 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] HELP! Will PAY YOU to Fix This Problem!
Hi; I just built out a new server according to a formulary I´ve worked before without any problems. Now, however, I have a bug in ALL of my Zope sites that throws a strange attribute error for various attributes that have always worked in the past (see thread AttributeError: Can´t Pin It Down!). I built everything from *.zexp files when my sites were working fine on my old server. I can send you the exact formulary I used to build the server (on FBSD). I have lost a couple of weeks over this silly problem that no one on the list has been able to address. HELP! Write me off list. Give me your hourly rate. Thanks, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com. ___ 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] help with detecting mime_type
Dears, In my external method I can get mime_type = file.headers.headers[1].split()[1] and then my code proceed based on which mime type was identified for the file uploaded. What happens now is that a user uploading a tgz file from a Windows platform and then my code did not identify it as a application/x-gzip-compressed or similar (it gets application/octet-stream). As far as I understood from this case, such mime type info is passed by user's system (where Windows usually is not aware of tar.gz, tgz etc format) rather than being set by zope server. So since I was not aware of that, my question is: does anyone know a better and reliable way of identifying a file mime type (or a file format) independent from which platform/browser it is submitted? I realise I can use a conditional for checking extension file name in addition to mime type detection. But I would go for that only if I cannot find anything fairer. Many thanks in advance. Alan -- Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate Department of Biochemistry, University of Cambridge. 80 Tennis Court Road, Cambridge CB2 1GA, UK. http://www.bio.cam.ac.uk/~awd28 ___ 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 with detecting mime_type
--On 24. Mai 2007 11:31:17 +0100 Alan [EMAIL PROTECTED] wrote: Dears, In my external method I can get mime_type = file.headers.headers[1].split()[1] and then my code proceed based on which mime type was identified for the file uploaded. What happens now is that a user uploading a tgz file from a Windows platform and then my code did not identify it as a application/x-gzip-compressed or similar (it gets application/octet-stream). As far as I understood from this case, such mime type info is passed by user's system (where Windows usually is not aware of tar.gz, tgz etc format) rather than being set by zope server. AFAIK..all Zope types derived from OFS.File or OFS.Image are using OFS.contenttypes.guess_content_types()...if the 'content-type' header isn't available. Otherwise Zope will use it. -aj pgpMsaCGABmdo.pgp Description: PGP signature ___ 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] Help me some error when I complie Zope!
I'm using WindowsXP, Python 2.4.3, Visual Studio 2005. When I complie Zope 2.9.6 from source, it alway alert: running build_ext creating zope.proxy copying zope/proxy\proxy.h - zope.proxy error: The .NET Framework SDK needs to be installed before building extensions for Python. NMAKE : fatal error U1077: 'C:\Python24\python.exe' : return code '0x1' Stop. Somebody help me solve this problem. Don't say me install .NET Framework, because I installed VS2005 include .NET Framework(I think so) ___ 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] help, installing ZJetDA-0.1.1..
Hi, I have copied the folder of the ZJetDA-0.1.1 product on the directory C:\Zope\2.10,1 \ Zope \ lib \ python \ Products and restarted Zope. If I go in the Control panel --Product management, I can visualize it, but how can I use it? how to create an instance of it in my project… Probably I didn't understand How to add a Product... I hope in your aid….Thanks.. Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/ ___ 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, installing ZJetDA-0.1.1..
Hi, I have copied the folder of the ZJetDA-0.1.1 product Have you seen how old ZJetDA is? I'm not surprised it doesn't work with Zope2.10. If you want to use this you'll possibly have to modify it's code. Better look for different database adapter. I think that mxODBC might be best solution for you. -- Maciej Wisniowski ___ 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! Can't Log Into ZMI!!
When you have access to the ssh on your server i think you can set an 'master password' I couldn't even pull up the ZMI password dialog box. But I figured it out. I changed IP addresses and needed to update that in the zope.conf because ZEO listens on port . I wonder why I can't just use the localhost address: 127.0.0.1 ? Doesn't seem to work. Nancy ___ 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] Help! Can't Log Into ZMI!!
Hi; I added a LDAPUserFolder instance to my Plone. It didn't connect for whatever reason. I rebooted the server. Now I can't log in! It just hangs. Actually, I rebooted a day later and did lots of work in between, so it's not like I could carefully edit the Data.fs. What do I do? Nancy ___ 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! Can't Log Into ZMI!!
here you can find some additional informations for zpasswd: http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Security.stx search for Creating an Emergency User - cs From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nancy Donnelly Sent: Sunday, November 26, 2006 5:10 PM To: zope@zope.org Subject: [Zope] Help! Can't Log Into ZMI!! Hi; I added a LDAPUserFolder instance to my Plone. It didn't connect for whatever reason. I rebooted the server. Now I can't log in! It just hangs. Actually, I rebooted a day later and did lots of work in between, so it's not like I could carefully edit the Data.fs. What do I do? Nancy ___ 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 performance
Jonathan wrote: - Original Message - From: Yuri [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, November 23, 2006 11:07 AM Subject: [Zope] help performance Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) You could try different transaction subcommit threshold settings (Catalog - Advanced tab) to see if different settings have any beneficial impact. Subtransactions are *Disabled :) * ___ 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 performance
Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 23. November 2006 17:07:39 +0100 Yuri [EMAIL PROTECTED] wrote: Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( # more version.txt 1.7.2 for Zope 2.5.1 and 2.6.1, 2.7.3, 2.8, 2.9 Python 2.3.x, 2.4.x ___ 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 performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:16:50 +0100 Yuri [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. - -aj - -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFZsd3CJIWIbr9KYwRAkt2AKCssal5dASk5L2Hr5Hx25NcP73HlACfd8sR zwcPSLgP0kd/wyMVPCtV4oU= =lx7b -END PGP SIGNATURE- ___ 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 performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. and *enable* subtransactions! - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFZsfJCJIWIbr9KYwRAn4EAJ9NDvAQT4jOEcBSOEshEWz/I6EtEwCfepEK tPE8sMBxMQET/euEhCVAD5g= =FztJ -END PGP SIGNATURE- ___ 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 performance
Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) ___ 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 performance
Yuri wrote: When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) You might be surprised... 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 )
Re: [Zope] help performance
On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. -- Martijn Pieters ___ 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 performance
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. ok, you got me :) with callprofiler I have: +0.0209 0.1213 1.4%+- inserimento +0.0461 0.0044 0.1%| +- standard_html_header +0.0479 0.0018 0.0%| | +- intestazione_html_standard +0.0518 0.0012 0.0%| | +- mappa_barra_loggato 0.0931 1.1%| | +0.1467 7.4849 85.1% | +- dafne_item_add 1.1709 13.3% | | | +1.3175 0.0027 0.0%| | +- proprietario +1.3245 0.0450 0.5%| | +- sonopubblico 0.1486 1.7%| | | +1.5181 0.0026 0.0%| | +- proprietario (2nd call) 1.3108 14.9% | | | +2.8316 0.0043 0.0%| | +- globale 4.6964 53.4% | | | +7.5323 0.0452 0.5%| | +- sonopubblico (2nd call) 0.1539 1.7%| | | +7.7324 0.0367 0.4%| +- invalida_cache +7.7704 0.0010 0.0%| +- standard_html_footer What does exactly take 4.6 sec? :-o ___ 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 )
[Fwd: Re: [Zope] help performance]
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. 0.0209 0.9%| +0.0209 0.0174 0.7%+- inserimento +0.0320 0.0042 0.2%| +- standard_html_header +0.0337 0.0017 0.1%| | +- intestazione_html_standard +0.0374 0.0011 0.0%| | +- mappa_barra_loggato +0.0423 1.0951 46.8% | +- dafne_item_add 0.5836 24.9% | | | +0.6260 0.0028 0.1%| | +- proprietario +0.6301 0.0484 2.1%| | +- sonopubblico +0.6804 0.0026 0.1%| | +- proprietario (2nd call) 0.0406 1.7%| | | +0.7236 0.0043 0.2%| | +- globale 0.4665 19.9% | | | +1.1945 0.0457 2.0%| | +- sonopubblico (2nd call) +1.2423 0.0033 0.1%| +- invalida_cache +1.2468 0.0010 0.0%| +- standard_html_footer Ok, I've run a machine for three years without any optimizations. Enabling transaction cut the time of about 73%: http://myurl/inserimento2.3416 5.5694 8.7971 8.7971, 2.3416 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- ___ 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: [Fwd: Re: [Zope] help performance]
On 11/24/06, Yuri [EMAIL PROTECTED] wrote: 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- Indeed. And if you tweak the threshold as Jonathan suggested, you could even get it lower. -- Martijn Pieters ___ 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: [Fwd: Re: [Zope] help performance]
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- Indeed. And if you tweak the threshold as Jonathan suggested, you could even get it lower. Just to clarify, 2.3 sec is the time to insert only one object :) I'll try to tweak it as suggested by you gurus :P ___ 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] help performance
Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) TIA ___ 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 performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 23. November 2006 17:07:39 +0100 Yuri [EMAIL PROTECTED] wrote: Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) ZopeProfiler will tell you about bottlenecks. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFZce2CJIWIbr9KYwRAjMFAKCje2mf4XN4z/loynCUMo+MIW4cSwCfUnUA dH8pNs+4XK2yrzjJ+sfVWlQ= =1Uee -END PGP SIGNATURE- ___ 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 performance
- Original Message - From: Yuri [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, November 23, 2006 11:07 AM Subject: [Zope] help performance Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) You could try different transaction subcommit threshold settings (Catalog - Advanced tab) to see if different settings have any beneficial impact. Jonathan ___ 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] Help create filesystem skin with product
I'm having a problem which must have been solved many times before- trying to make a product that ships with a skin. I'm new to Zope development, been stumbling for a couple months with it. Ideally, the end user will unpack my product Q into a Products directory. They will be able to add a Q object to an existing CMF site, or create a QSite at their Zope2 root. If they create a QSite, my product should give it a QSkin during instantiation. I'm developing the QSkin (and the entire Q product) on the filesystem. Background: The product includes a subclass of CMFSite called a QSite. If the user creates a QSite, I'd like it to include a QSkin which the user can select from the portal_skins tool. The product is running on Zope 2.9.4, Five 1.4, CMF 2.0. It needs to work on Windows and Linux. (Would like to use Zope 2.10, Five 1.5 when someone compiles the win32 installer, so I don't have to worry about five:traversable directives! Already posted a request for that.) Customer requires that the product have no Plone dependencies. Product will require workflow, so it can have a CMF dependency. Could possibly implement on Zope 3, though I could not figure out basic workflow management on that platform, and would rather not re-implement something available on Zope2. Hurdles I've had so far in creating a skin: Using Five- seems to be the way to go. Started by trying browser:page browser:defaultView with QSite/IQSite- really didn't know what I was doing, and a helpful sould pointed out, that is what skins are for. Tried using zcml skin directive, broswer:layer, and browser:defaultSkin. I can create a skin in zcml, and adding /++skin++QSkin to the end of any URL causes the page to load. However it does not look like a QSkin- apparently acquisition finds items in portal_skins before it finds resources added by five. So if I use zcml to add a Logo.gif, it won't override a Logo.gif already on the CMF site, to see it I have to also add /++resource++Logo.gif I cannot use defaultSkin with CMF, because CMF already declares a defaultSkin. Its better if the user picks the skin from the portal_skins management interface, but skins and layers declared in zcml don't show up there. As for the old/tried-and-true way, can't use the ExampleFileSystemSkin or MinimalPloneSkin as a starting point, perhaps they use parts of Plone: cannot import name ContentFactoryMetadata. http://plonebook.packtpub.com/chapter6_preview.htm looks promising. Hurdles I've had so far installing the skin: Tried using container events (subscriber zcml) to call a hook when a QSite is created, presuming that I'd work skin magic on the new site object from within the event handler. Alas that is not the intended purpose of subscriber and while it may work in the future, events don't fire on CMFSite objects yet. Am I supposed to create a manage_afterAdd method in my QSite object, even though it's depreciated? Hmm, just tried creating that as a method of QSite and it doesn't get called either- what's the right way? Thanks for reading my rambling. ___ 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 create filesystem skin with product
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11 Oct 2006, at 18:37, yary wrote: I'm having a problem which must have been solved many times before- trying to make a product that ships with a skin. I'm new to Zope development, been stumbling for a couple months with it. Take a look at CMFCalendar as included in the CMF 2.0 you're working with. It registers a skin folder and even adds it to the skins path automatically, using a GenericSetup profile. That's a good example to look at. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFLXc5RAx5nvEhZLIRAmRuAJ9yn69WUwiAJLKmi/2jVDJ7YoTI3wCfbGtP XMdrIbhMWwLOuciLBJACtUU= =t4JR -END PGP SIGNATURE- ___ 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! Zope Crashed! Production Server!
Since you're running it with runzope (i.e. in foregreound mode): 1) Can you confirm Zope provided the message Zope Ready to handle requests 2) What is the top command showing? Is python/zope process using CPU, or is it simple unresponsive? 3) Can you check if there are different processes when you start and when you do your first request? With some C extensions of python, you can end with hanging python processes (at least on Linux; don't know on FreeBSD). 4) Is the zope process able to write to Z2.log, event.log and (if used) trace.log? Hope this can help. Regards Marco -- Marco Bizzarri http://notenotturne.blogspot.com/ ___ 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! Zope Crashed! Production Server!
The most common issue on *BSD is this: http://tomster.org/blog/archive/2006/09/27/size-does-matter Stefan On 4. Okt 2006, at 20:43, Javier Subervi wrote: The person who ran this box previously didn't understand FreeBSD's port system, so he built Python in a different place. -- It doesn't necessarily do it in chronological order, though. --Douglas Adams ___ 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] Help! Zope Crashed! Production Server!
Hi;I'll afford a server to experiment on before year's end, but that doesn't help me today. I was trying to get Python 2.3.5 to work with LDAP on FreeBSD. I built py-ldap2 from ports and directed it to install Python 2.3.5 (because I'm using Zope 2.7.8 because my software won't migrate yet). It built out okay. The person who ran this box previously didn't understand FreeBSD's port system, so he built Python in a different place. I moved all of that for safety's sake (at least, I thought I did), and then ended up moving it all back because I couldn't fire up Zope (I have 2 instances). Then I was able to fire up Zope *and* import LDAP (the latter indicating something from my new installation stuck). When I ps wax I see Zope is working. However, when I surf to sites, or even the IP address, it just hangs! I cleared out log/event.log and touched it and fired up in runzope mode, but there was nothing strange in the event.log! And I've been over that log many times lately, so I would recognize something different. I presume ZServer is hung. How do I trouble-shoot this?TIA,Javier2 Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.___ 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! Zope Crashed! Production Server!
When I ps wax I see Zope is working. However, when I surf to sites, or even the IP address, it just hangs! Stop Zope and check whether you still have any Zope processes. If so then kill'em and then try to run Zope again. I had similiar problems with hanged Zope processes. Maybe that's your's problem too. You may use netstat to check whether your Zope is listening. -- Maciej Wisniowski ___ 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! Zope Crashed! Production Server!
http://www.zettai.net/Support/Howto/deadlockDebuggerHowto On Wed, Oct 04, 2006 at 11:43:25AM -0700, Javier Subervi wrote: Hi; I'll afford a server to experiment on before year's end, but that doesn't help me today. I was trying to get Python 2.3.5 to work with LDAP on FreeBSD. I built py-ldap2 from ports and directed it to install Python 2.3.5 (because I'm using Zope 2.7.8 because my software won't migrate yet). It built out okay. The person who ran this box previously didn't understand FreeBSD's port system, so he built Python in a different place. I moved all of that for safety's sake (at least, I thought I did), and then ended up moving it all back because I couldn't fire up Zope (I have 2 instances). Then I was able to fire up Zope *and* import LDAP (the latter indicating something from my new installation stuck). When I ps wax I see Zope is working. However, when I surf to sites, or even the IP address, it just hangs! I cleared out log/event.log and touched it and fired up in runzope mode, but there was nothing strange in the event.log! And I've been over that log many times lately, so I would recognize something different. I presume ZServer is hung. How do I trouble-shoot this? TIA, Javier2 - Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail. ___ 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 ) -- Paul Winkler http://www.slinkp.com ___ 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] Help! I Screwed Up a Source File
Hi; I inherited this box so I don't know exactly how this file got built; however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this file: 278/lib/python/Zope/Startup/zeoctl which incorrectly reads like this: #!/bin/sh # ZEO instance control script # The following two lines are for chkconfig. On Red Hat Linux (and # some other systems), you can copy or symlink this script into # /etc/rc.d/init.d/ and then use chkconfig(8) to automatically start # ZEO at boot time. # chkconfig: 345 90 10 # description: start a ZEO server PYTHON=/usr/local/zope/py235/bin/python ZODB3_HOME=/usr/local/zope/278/lib/python CONFIG_FILE=/usr/local/zope/instance2/var/zeo/etc/zeo.conf PYTHONPATH=$ZODB3_HOME export PYTHONPATH ZEOCTL=$ZODB3_HOME/ZEO/zeoctl.py exec $PYTHON $ZEOCTL -C $CONFIG_FILE ${1+$@} ~ Where can I grab a copy of the correct file? TIA, beno ___ 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! I Screwed Up a Source File
On 9/5/06, beno [EMAIL PROTECTED] wrote: I inherited this box so I don't know exactly how this file got built; however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this file: 278/lib/python/Zope/Startup/zeoctl Where can I grab a copy of the correct file? Download 2.7.8 from Zope.org and extract that one file? -- Martijn Pieters ___ 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] Help on installing ZFSPath / LocalFS
Hi. I'm pretty much a newbie when it comes to using Zope. I'd like to install ZFSPath or LocalFS (something to get hands on to local files).. So, I've unpacked the files to Products dir. I'm supposed to create a ZFSPath object somewhere. How do I excactly do that? And, ultimately, how do I use ZFSPath once it's installed??? Sorry about this, I'm an ass.. -- View this message in context: http://www.nabble.com/Help-on-installing-ZFSPath---LocalFS-tf1895239.html#a5183268 Sent from the Zope - General forum at Nabble.com. ___ 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 on installing ZFSPath / LocalFS
Please, someone -- View this message in context: http://www.nabble.com/Help-on-installing-ZFSPath---LocalFS-tf1895239.html#a5185588 Sent from the Zope - General forum at Nabble.com. ___ 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 on installing ZFSPath / LocalFS
insinjoori wrote at 2006-7-5 08:00 -0700: So, I've unpacked the files to Products dir. I'm supposed to create a ZFSPath object somewhere. How do I excactly do that? Maybe, you start reading the Zope Book (2.7 edition, online) and learn how objects are created in general. -- Dieter ___ 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 needed to simplify some code
Paul Winkler wrote: span tal:define=opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1) li repeat=opt opts a tal:content=python:opt/label ^^^ Leave out the python: there. Whoops, yep, sorry about that... 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 )
Re: [Zope] Help needed to simplify some code
John Poltorak wrote: Several months ago someone provided me with me with some sample code which did exactly what I wanted, but looking at it again it looks a little unwieldy and could do with tidying up. It consists of:- span tal:define=opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1) tal:block repeat=opt opts lia tal:content=python:opt[1] tal:attributes=href python:'news_items/' + opt[0]/a/li /tal:block /span Okay, if you can get parse_file to return a list of dictionaries like: [ { 'folder':'whatever', 'label':'whatever', } ] ...then you can do: span tal:define=opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1) li repeat=opt opts a tal:content=python:opt/label tal:attributes=href string:news_items/${opt/folder}/ /li /span 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 )
Re: [Zope] Help needed to simplify some code
On Wed, Mar 08, 2006 at 09:35:55AM +, Chris Withers wrote: John Poltorak wrote: Several months ago someone provided me with me with some sample code which did exactly what I wanted, but looking at it again it looks a little unwieldy and could do with tidying up. It consists of:- (snip) What Chris said, except: ...then you can do: span tal:define=opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1) li repeat=opt opts a tal:content=python:opt/label ^^^ Leave out the python: there. -PW -- Paul Winkler http://www.slinkp.com ___ 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] Help needed to simplify some code
Several months ago someone provided me with me with some sample code which did exactly what I wanted, but looking at it again it looks a little unwieldy and could do with tidying up. It consists of:- span tal:define=opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1) tal:block repeat=opt opts lia tal:content=python:opt[1] tal:attributes=href python:'news_items/' + opt[0]/a/li /tal:block /span which involves parsing a file containing two fields separated by ',' eg. 001,abc 002,jkl 003,xyz The second field is just a string which appears in a selection menu, and the first is the name of a folder which contains an object called 'content' which get displayed on selecting the correponding link. I know this is not a particularly elegant way of doing it, but after looking at some TAL examples just can't figure out the right way to do it. Some help in simplifying it would be appreciated. -- John ___ 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
Andreas Pakulat wrote: This should show at least zope-2.7. If that shows up you can find the documentation and how to setup an instance in /usr/share/doc/zope-2.7. Although, in all seriousness, I'd recommend installing from source. And I'd recommend the original poster read Eric Raymond's how to ask questions post, 'help' is not a useful subject line... 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] help
hi to all. I wanted to install zope on my debian system but I noticed there is a /usr/lib/zope directory. so I concluded zopehas already beeninstalled with my debian system. so what to do now? I'm just beginning. tanx Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez la version beta.___ 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
On 15.12.05 20:14:51, adeline nombre wrote: I wanted to install zope on my debian system but I noticed there is a /usr/lib/zope directory. so I concluded zope has already been installed with my debian system. so what to do now? I'm just beginning. You can find out about packages that are installed with dpkg -l zope* This should show at least zope-2.7. If that shows up you can find the documentation and how to setup an instance in /usr/share/doc/zope-2.7. Andreas -- You will have domestic happiness and faithful friends. ___ 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] Help with a simple DMS
Hi. I'd like to make a simple DMS, users upload their PDFs/docs/ps/whatever and then they can search within the documents. I need to be able to automate the submission of documents as I'm part of a large research lab, we've accumulated a lot of papers over the years. Other than that I'd like a nice, simple authentication scheme. That's about it. Dead simple. Please help. I've got an instance of Zope running, with Plone. The plethora of tools is bewildering to me and I don't know what to use. I am a Python programmer (three years now I think) but I'd like to minimize the amount of code I have to write. Simplicity and ease of use are my watchwords. If Zope doesn't provide what I'm looking for, can you suggest anything else? Thank you. Josh. ___ 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 with a simple DMS
Joshua Gilbert wrote: Hi. I'd like to make a simple DMS, users upload their PDFs/docs/ps/whatever and then they can search within the documents. I believe TextIndexNG will index contents of complex file types. I need to be able to automate the submission of documents as I'm part of a large research lab, we've accumulated a lot of papers over the years. What exactly does automate the submission of documents mean? Other than that I'd like a nice, simple authentication scheme. That's about it. Dead simple. Then stick with how it's already set up. Plone provides a nice UI for user management. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ 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 with a simple DMS
On 2/7/06, J Cameron Cooper [EMAIL PROTECTED] wrote: Joshua Gilbert wrote: Hi. I'd like to make a simple DMS, users upload their PDFs/docs/ps/whatever and then they can search within the documents. I believe TextIndexNG will index contents of complex file types. OK, that's great. Where do I find documentation to tell me how to set up the site? I need to be able to automate the submission of documents as I'm part of a large research lab, we've accumulated a lot of papers over the years. What exactly does automate the submission of documents mean? I mean that I have a great deal of papers. I can't go through web forms to add all of these documents. I would like to be able to submit them through an automated process, I can't go through web forms by hand to add them all. I'm trying to convince my lab that this is a useful product. If I ask them to submit their papers one at a time I'll lose the argument and we won't use Zope. Other than that I'd like a nice, simple authentication scheme. That's about it. Dead simple. Then stick with how it's already set up. Plone provides a nice UI for user management. Fair enough. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ 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 with a simple DMS
Joshua Gilbert wrote: On 2/7/06, J Cameron Cooper [EMAIL PROTECTED] wrote: Joshua Gilbert wrote: Hi. I'd like to make a simple DMS, users upload their PDFs/docs/ps/whatever and then they can search within the documents. I believe TextIndexNG will index contents of complex file types. OK, that's great. Where do I find documentation to tell me how to set up the site? According to http://opensource.zopyx.biz/OpenSource/TextIndexNG3 Ready-for-Plone (refer to installation notes in doc/README.txt) I need to be able to automate the submission of documents as I'm part of a large research lab, we've accumulated a lot of papers over the years. What exactly does automate the submission of documents mean? I mean that I have a great deal of papers. I can't go through web forms to add all of these documents. I would like to be able to submit them through an automated process, I can't go through web forms by hand to add them all. I'm trying to convince my lab that this is a useful product. If I ask them to submit their papers one at a time I'll lose the argument and we won't use Zope. Use WebDAV, FTP, or Enfold Desktop. There are other methods, but these are easiest. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com ___ 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 me!
Bruno Grampa wrote at 2006-1-9 23:39 +0100: i'm building a site to sell images (this is the concept, the reality is different...). All the images are in a directory mapped through LocalFS product. For every image i have a record in a SQL table with all the basic informations: author, name of the file, cost. What i haven't understood is how to block users from getting images if they have not enough credit to buy them. You drastically restrict access to the LocalFS content (e.g. by granting the Access contents information and View permissions only for Manager) and provide access to it via a Python Script with proxy role Manager. This script can check any conditions you would like to be fulfilled before it grants access. -- Dieter ___ 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] Help me!
Hello, i'm building a site to sell images (this is the concept, the reality is different...). All the images are in a directory mapped through LocalFS product. For every image i have a record in a SQL table with all the basic informations: author, name of the file, cost. What i haven't understood is how to block users from getting images if they have not enough credit to buy them. I need to control the view method, but i don't know if this idea is the right one or there are better solutions. Any hints? Thanks, Bruno ___ 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 me!
Bruno Grampa wrote: Hello, i'm building a site to sell images (this is the concept, the reality is different...). All the images are in a directory mapped through LocalFS product. For every image i have a record in a SQL table with all the basic informations: author, name of the file, cost. What i haven't understood is how to block users from getting images if they have not enough credit to buy them. I need to control the view method, but i don't know if this idea is the right one or there are better solutions. Any hints? Thanks, Bruno Bruno, Maybe you can better explain your question. Im not at all sure the following will help: Seems like you can check a users credit at login, store the credit score in SESSION and use that for branching logic. You could also update the creditScore as it changes. Then you can develope your pages with stuff like this: (syntax not checked) in TAL a hRef=somewhere tal:condition=python: request.SESSION['hasCredit'];This link only shows up if session's 'hasCredit' is true./a In DTML dtml-if SESSION['hasCredit'] a hRef=somewhere ... dtml-else hRef=somewhereelse In Python: (and TAL macros) if context.REQUEST.SESSION['hasCredit']: return container.Images.macros['allImages'] else return container.Images.macros['someImages'] David ___ 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 me!
--On 9. Januar 2006 16:04:28 -0800 David H [EMAIL PROTECTED] wrote: Maybe you can better explain your question. ...especially with such a sense-free subject as Help me. -aj pgpWZTTahPYXo.pgp Description: PGP signature ___ 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] Help with Zope Python result object please!
hello, I have a python code that recieves two result objects from two different ZSQL methods. I need to join them (sort of like UNION). I can't do result1+result2, otherwise it raises an exception that the + operator isn't supported. When I try to do this (read below, I explained what i've done if you are lazy to read the code) result1 = context.zsqlmethod1() result2 = context.zsqlmethod2() if (len(result1) == 0): return result2 row1 = 0 row2 = len(result1) + 1 col = 0 for r in result2: col = 0 if (context.duplicateExists(result1, result2[row1][0]) == -1): result1[row2][col] = result2[row][col] col = col + 1 row1 = row1 + 1 row2 = row2 + 1 return result1 Basically, it loops through the rows and columns of result2 and adds them to the end of th e result 1. However it for some reason raises "index out of range" and says that assigning result1[0][0]=result2[0][0] (if there is an element in both of them) is illegal because: Error Value: object does not support item or slice assignment I realize that in most programming languages you can't add them to result1 without resizing it first, but I can't find much documentaiton on member functions of the result object, so I can't resize it. I am completely stuck, I've tried everything, spent so much time on it, can anyone please help save my sanity :P Thanks in advance guys! I really appreciate it. Yahoo! DSL Something to write home about. Just $16.99/mo. or less___ 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 with Zope Python result object please!
Alric Aneron wrote: hello, I have a python code that recieves two result objects from two different ZSQL methods. I need to join them (sort of like UNION). I can't do result1+result2, otherwise it raises an exception that the + operator isn't supported. When I try to do this (read below, I explained what i've done if you are lazy to read the code) result1 = context.zsqlmethod1() result2 = context.zsqlmethod2() if (len(result1) == 0): return result2 row1 = 0 row2 = len(result1) + 1 col = 0 for r in result2: col = 0 if (context.duplicateExists(result1, result2[row1][0]) == -1): result1[row2][col] = result2[row][col] col = col + 1 row1 = row1 + 1 row2 = row2 + 1 return result1 Basically, it loops through the rows and columns of result2 and adds them to the end of th e result 1. However it for some reason raises "index out of range" and says that assigning result1[0][0]=result2[0][0] (if there is an element in both of them) is illegal because: Error Value: object does not support item or slice assignment I realize that in most programming languages you can't add them to result1 without resizing it first, but I can't find much documentaiton on member functions of the result object, so I can't resize it. I am completely stuck, I've tried everything, spent so much time on it, can anyone please help save my sanity :P Thanks in advance guys! I really appreciate it. Y Alric, The merging of two zsql result sets is easy - here's one way: newResults = [] for r in resultset1: newResults.append( r ) for r in resultset2: newResults.append( r ) return newResults. David ___ 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 with Zope Python result object please!
Thank you sir! Sorry, I am very new to python. It's quite unlike other languages. Happy new year! AlDavid H [EMAIL PROTECTED] wrote:Alric Aneron wrote: hello, I have a python code that recieves two result objects from two different ZSQL methods. I need to join them (sort of like UNION). I can't do result1+result2, otherwise it raises an exception that the + operator isn't supported. When I try to do this (read below, I explained what i've done if you are lazy to read the code) result1 = context.zsqlmethod1() result2 = context.zsqlmethod2() if (len(result1) == 0): return resu lt2 row1 = 0 row2 = len(result1) + 1 col = 0 for r in result2: col = 0 if (context.duplicateExists(result1, result2[row1][0]) == -1): result1[row2][col] = result2[row][col] col = col + 1 row1 = row1 + 1 row2 = row2 + 1return result1Basically, it loops through the rows and columns of result2 and adds them to the end of th e result 1. However it for some reason raises "index out of range" and says that assigning result1[0][0]=result2[0][0] (if there is an element in both of them) is illegal because: Error Value: object does not support item or slice assignment I realize that in most programming languages you can't add them to result1 without resizing it first, but I can't find much documentaiton on member functions of the result object, so I can't resize it. I am completely stuck, I've tried everything, spent so much time on it, can anyone please help save my sanity :PThanks in advance guys! I really appreciate it.Y Alric, The merging of two zsql result sets is easy - here's one way: newResults = [] for r in resultset1: newResults.append( r ) for r in resultset2: newResults.append( r ) return newResults. David Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___ 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 with url rewriting
Faheem Mitha wrote: Turns out the problem was indeed with the Proxy, I had to change to Allow from all inside the proxy.conf, to enable reverse proxying. Order deny,allow #Deny from all #Allow from .your_domain.com Allow from all I'm not sure an open proxy is that hot an idea, but this has nothing to do with Zope. I suggest you go and ask on #apache on irc.freenode.net 1) I can still access my plone site unauthenticated via http://machine_address:9673/test_plone. Again, nothing to do with Zope. iptables is the way to go, and I bet £5 you lock yourself out of your machine within 2 hrs of playing with this ;-) Go to #debian on irc.freenode.net and wear flameproof clothing ;-) 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 )
Re: [Zope] help with url rewriting
Am Freitag, den 11.11.2005, 23:45 -0500 schrieb Faheem Mitha: On Fri, 11 Nov 2005, Faheem Mitha wrote: ... The main error is [Fri Nov 11 18:51:56 2005] [error] [client client_ip_address] client denied by server configuration: ^^ This means Apache, not Zope proxy:http://127.0.0.1:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone/colophon_anybrowser.png, referer: http://server_ip_address:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone 5) Here are the mods I have enabled. ... Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all ^ --- and here Allow from 127.0.0.0/255.0.0.0 ::1/128 ^ --- and here /Directory is the Problem. The example config needs to be changed to allow serving - this is true for static content as well as using mod_proxy. HTH Tino ___ 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 with url rewriting
On Sat, 12 Nov 2005, Tino Wildenhain wrote: [snip] 5) Here are the mods I have enabled. ... Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all ^ --- and here Allow from 127.0.0.0/255.0.0.0 ::1/128 ^ --- and here /Directory is the Problem. The example config needs to be changed to allow serving - this is true for static content as well as using mod_proxy. I'm sorry. I don't follow what you mean. Can you be more explicit? The web server is working fine for regular web pages, both SSL and non-SSL. Thanks.Faheem. ___ 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 with url rewriting
Am Samstag, den 12.11.2005, 03:26 -0500 schrieb Faheem Mitha: On Sat, 12 Nov 2005, Tino Wildenhain wrote: [snip] 5) Here are the mods I have enabled. ... Alias /doc/ /usr/share/doc/ Directory /usr/share/doc/ Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all ^ --- and here Allow from 127.0.0.0/255.0.0.0 ::1/128 ^ --- and here /Directory is the Problem. The example config needs to be changed to allow serving - this is true for static content as well as using mod_proxy. I'm sorry. I don't follow what you mean. Can you be more explicit? The web server is working fine for regular web pages, both SSL and non-SSL. Which pages beside the introductional page and the docs? And are you sure you want to access your Plone via http://yourserver/plone/ instead of http://yourserver/ ? Regards Tino ___ 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 with url rewriting
On Sat, 12 Nov 2005, Tino Wildenhain wrote: Am Samstag, den 12.11.2005, 03:26 -0500 schrieb Faheem Mitha: Which pages beside the introductional page and the docs? The pages in the Document Root work fine. That is, the pages at http://yourserver, which correspond to /var/www/html and https://yourserver, which correspond to /var/www/html-ssl. I have a config file called default, which is exactly like the ssl config file, except for being for port 80, and not having the Zope stuff in it. I can mail that if you want. And are you sure you want to access your Plone via http://yourserver/plone/ instead of http://yourserver/ ? Yes. Well, https://yourserver/plone. Thanks for your help. Faheem. ___ 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 with url rewriting
On Fri, 11 Nov 2005, Faheem Mitha wrote: 6) I was wondering if there might be something wrong with the Proxy thing. I've kept proxy.conf at the Debian defaults. Included below. In particular ProxyRequest are off, but another Debian machine I have access to works fine with that setting. Turns out the problem was indeed with the Proxy, I had to change to Allow from all inside the proxy.conf, to enable reverse proxying. Order deny,allow #Deny from all #Allow from .your_domain.com Allow from all /Proxy I've now got a further question, in case anyone feels like indulging me. 1) I can still access my plone site unauthenticated via http://machine_address:9673/test_plone. What is the best way to switch that off so it can only be accessed via the https interface? Thanks. Faheem. ___ 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 with url rewriting
Faheem Mitha wrote: Why not just: /plone(.*) This is the way to go, I don't know what Sascha meant when he was talking about 2 rules. However, he did have a very good point about SSL. If you want Apache to do the SSL encryption and decryption, then you need to set up mod_ssl, sort out the certificates, etc. I have this working on a few of my servers but I'm working offline so can't really have a look to see what you're doing wrong... 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 )