Re: [Zope] store data as long as the user is logged on
Tino Wildenhain wrote: Am Donnerstag, den 21.07.2005, 16:36 +0200 schrieb gabor: hi, i need to store some data as long as the user is logged on to zope. how can i achieve this? using the session is not a good idea, because some parts of the code simply call session.clear() (i did not write that part). if everything fails, i can use a singleton where i put a dictionary based on some-kind-of user-id... but i'd like to avoid that if possible (don't want to think about the multi-user-asking-at-the-same-time problems).. is there any place where i could attach my data structure? Session is still the best thing you can use in this case. Note that HTTP is stateless, you just dont know when a user "logs out". - unless she is so friendly to use a button on your site where you can trigger to delete the session and auth cookie. yes, i know that the session is stateless.. it's just that there IS an authentication at the beginning... the standard login/password thing... (i just recently came to the codebase). so ZOPE know when the user logs in and when he logs out. and i'd like to somehow use that information to store my data somewhere. gabor ___ 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] store data as long as the user is logged on
hi, i need to store some data as long as the user is logged on to zope. how can i achieve this? using the session is not a good idea, because some parts of the code simply call session.clear() (i did not write that part). if everything fails, i can use a singleton where i put a dictionary based on some-kind-of user-id... but i'd like to avoid that if possible (don't want to think about the multi-user-asking-at-the-same-time problems).. is there any place where i could attach my data structure? thanks, gabor ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] how to get info about an object (dir/type)
Andreas Jung wrote: --On 30. Juni 2005 13:48:19 +0200 gabor <[EMAIL PROTECTED]> wrote: hi, while working with zope, i many times have the following problem: i find a method that i can use, and the documentation (for example) says: "returns the current user". ok, but what kind of object is it? what methods does it have? lib/python/AccessControl/User.py is your friend. thanks for your help, but .. it is not about this specific issue (about the current user).. generally.. if i have a reference to an object. how do i find out what his methods are? gabor ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] how to get info about an object (dir/type)
hi, while working with zope, i many times have the following problem: i find a method that i can use, and the documentation (for example) says: "returns the current user". ok, but what kind of object is it? what methods does it have? usually i would simply call dir() or type() on the result object, but those are forbidden in zope. how do you usually solve this? gabor ___ 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] developing with zmi: how to move a patch from data from devel to live?
Jens Vagelpohl wrote: On 20 Jun 2005, at 07:35, gabor wrote: now you create the fix/improvement on the devel server. but now how do you move the improvement/fix to the live server? you cannot just copy the data.fs over. the customer already has some content/data in it... one way seems to be to not use the ZMI at all. you create an install python script, which calls the methods of the ZMI interface. this way works, but it seems for me to waste my time. finding the right method that the gui calls to call it from the install script seems stupid for me. but it solves the problem. with the script i can really make the changes i need on the devel server. so, is there a solution where i can use the ZMI? how do you solve this kind of problem? The problem is that you develop using the ZMI. It's a bad pattern. Don't do it. well, it's the opposite. i (our company) don't develop using the ZMI. i'm using an install script. so when we install our program, no gui editing is needed. but last week i've seen a presentation which used a CMS system called Typo3. and a guy showed us how he can build a CMS only with gui tools. it was very fast and effective. and then i thought.. wow, you can work sooo fast in typo3. and we're so slow to develop with zope (plone/cmf/whatever). and then i remembered. but wait, we don't use the gui tools (zmi) at all! maybe we should! an example: for the next version of the program, we decided to change an action what happens when you click on a TAB in the CMS. in gui, i would do it like this: go to the portal_actions object, find the correct tab, change the python-script associated to it. but we had to dig thru the source code, to find out how the ZMI does it, and follow the same process when we did it programmatically in the python install script. it took us let's say 4-5hours (partly because that part of the CMF was badly documented, and used a quite inconvenient way to handle that) compare that: 1minutes in the ZMI or 5hours in a python-script. which one is better? well, or let me ask the question a different way: if i should not use the ZMI, then why is it there? gabor ___ 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] developing with zmi: how to move a patch from data from devel to live?
hi, my problem is the following... imagine that you develop something for the customer using zope. while developing you use the ZMI a lot... to set some settings, to create python scripts and so on. you do this on the 'devel' server. then you deliver the solution to the customer (to the 'live' server). you can simply copy the data.fs stuff to the live server. after some time the either customer wants some new features, or there's a bug to fix or something like that. now you create the fix/improvement on the devel server. but now how do you move the improvement/fix to the live server? you cannot just copy the data.fs over. the customer already has some content/data in it... one way seems to be to not use the ZMI at all. you create an install python script, which calls the methods of the ZMI interface. this way works, but it seems for me to waste my time. finding the right method that the gui calls to call it from the install script seems stupid for me. but it solves the problem. with the script i can really make the changes i need on the devel server. so, is there a solution where i can use the ZMI? how do you solve this kind of problem? gabor ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZEO recommended for single-cpu?
hi, i understand that you need to use ZEO when running ZOPE on a multi-cpu machine (or when you want to cluster ZOPE). but from mails on this forum it seems that people are also using ZEO when they're running ZOPE on a single-cpu machine. why? gabor ___ 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] zope backward compatibility policy?
Andreas Jung wrote: --On 13. Juni 2005 09:47:33 +0200 gabor <[EMAIL PROTECTED]> wrote: hi, what's the backward compatibility policy of zope? i'm asking because while upgrading from 2.6.4 to 2.7.2 we had some problems. simple ones (like the 'lines' property type seems to have changed from list to tuple), but still problems. From the cvs log of PropertyManager.py So this change was driven by security issues. And btw. it *is* documented in the release notes: """ - Some property types were stored in a mutable data type (list) which could potentially allow untrusted code to effect changes on those properties without going through appropriate security checks in particular scenarios. """ i see.. thanks a lot... it's just that this is documented in the 'bugfix' part. i didn't expect bugfixes to change the api hmm.. it seems that i will have to read the whole changelog (what happened between 2.6.4 and 2.7.2 ;)) gabor ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope backward compatibility policy?
hi, what's the backward compatibility policy of zope? i'm asking because while upgrading from 2.6.4 to 2.7.2 we had some problems. simple ones (like the 'lines' property type seems to have changed from list to tuple), but still problems. i checked the changelogs, and this change does not seem to be mentioned. i thought that if someone is not in the changelog, then is supposed to be unchanged. or not? p.s: i am still a beginner in the zope world, so maybe i am completely wrong :) gabor ___ 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] backing up a running zodb fileStorage
hi, i am trying to backup a zodb filestorage of a running zope. i'm on linux. i've read that you simply make a copy of the Data.fs file.. but what about the modifications/transactions that are happening when i make the copy. will not the database be in a corrupt state then? gabor ___ 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 )