[Zope-dev] Plain Ice Cream
Michel Pelletier wrote: Python Function is not quite right, as it is fairly common (for me, at least) to define some helper functions in a Python Method. But it is better than Python Script. That's a good point I hadn't thought of :-S Function is just as technical as method. These are OO techncial programming terms (function less than method). The idea is to lower the bar for people using Zope. People who only know HTML will be much more likely to grok what a script is than a method. We want to avoid elitism. Method is total OO elitism, function less so because it's very language neutral, and script is like plain vanilla ice cream, everyone gets it. No offence, but I don't think any of the above paragraph holds any weight. People who only know HTML won't be writing Python(Method/Function/etc)s anyway. I don't think any out of 'script', 'method' or 'function' will have more meaning than any of the others to these people. These are just words we're talking about, to the non-technical, it's not actually going to matter what they are. The main point is to avoid confusion, especially where words have associated meaning for technical people. That, IIUC, is why this discussion started in the first place... Like chocolate and coconut-shaving covered almonds, technical details mixed in with your ice-cream will appeal only to a smaller crowd. Vanilla Ice cream gets boring quickly! This ain't a good metaphor for your argument ;-) The new DC documentation motto is "Explain key ideas in simple terms." Method is not a simple term. Can you please make sure this doesn't become 'use less meaningful/incorrect vocabulary in an attempt to keep it simple, and so ending up with even more confusing terminology' ;-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Task, Job or Operation?
[EMAIL PROTECTED] wrote: I can see four potential properties that one could want to emphasize about a python method. 1) It is safer (to the Zope server) than a python external method. 2) It safer to the end user than a JavaScript (it never touches the client). 3) It uses python, and not something else as its implementation technique. 4) In OO terms, it is not really a Method. Good points :-) Hence the preference for Safe in the name. Even a newbie ought not to be able to cut himself too badly on a python method. I dunno... descriptive. Widget has technical meaning. Perhaps task or job are suitable, as in Safe Python Task Safe Python Job Nah, they have too many cron-esque associations. Sounds like things to be found on a to-do list on in a schedule of some sort. Safe Python Subtask :-( Then external methods, which are often also not methods, can become Flexible Python Task Well, felxible doesn't really explain a lot. Filesystem is probably the most explicit. I dunno, I actually like Jeff's suggestion of Operation giving you: PythonMethod- Python Operation External Method - Filesystem Python Operation The same could also apply to DTML and Perl Methods. A nice side effect is that you could have Filesystem DTML Operation replace those horribly named HTML File objects you get when use grab your DTML out of .dtml files on disk. Especially as they bypass all known security ;-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Block'ed
Michael Bernstein wrote: The diference (for me) between a View and a Block is whether they are intended to be accessed directly by a client (browser). Blocks also tend to be reuseable in many views (I typically have a Block (DTML Method) called main_navigation, for example), and can be composed of other Blocks. Views like index_html may be reused, but usually through acquisition, not recomposition. I like the idea behind blocks, I think it's probably the best name yet and described how most people use things like PythonMethods, external method and DTML Methods :-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] Michel's Reply
I'm not sure I grok what rightness has to do about it. I think this is right, to me wrong == broken. This is not broken. Let me persuade you. * someone adds an property named feed to an object at an intermediate location in the containment heirarchy. This breaks the cron job that calls self.Zoo.Diet.LargeAnimals.hippo.feed(), and all the hippos starve. This is the classic anti-acquisition argument, but it's a red herring. I used to believe that too, but no longer agree. I changed my mind after developing a large application in Zope, and spending alot of time firefighting the problems that it caused. The same argument applies to inheritance; introducing an attribute between two classes in a generalized relationship and your app breaks and all the hippos starve anyway. This analogy is false. If a programmer is responsible for a class and it becomes broken in that way then yes, he is at fault. Fortunately there are well understood principles for design inheritance relationships to keep this easy. Each project has a finite number of classes. Each class has dependencies to only a small number of other classes. Testing (is used appropriately) can be used to ensure correctness, and this probably means re-testing each derived class when a base class changes. The same is not true of a containment heirarchy. The containment heirarchy is managed by content managers, who are responsible for content. After adding content they might test that content, but they are unlikely to retest any functionality - its not their responsibility. The containment heirarchy is often large and sprawling. Acquisition-based bugs occur on a per-instance basis, not per-class, and typically there will be very many more instances in a system than there are classes. After a change to an instance there is a need to re-test *every* *instance* below the change in the containment heirachy. (When was the last time you changed your root folder? Did you test your whole site?). This makes it impractical to test them all. You raised the question of whether this is an anti-acquisition argument or a containtment-vs-context-binding argument. Please dont misunderstand me; acquisition is great when used appropriately. However if methods bound to containement then acquisition could not be used for the purpose you are demonstrating here. Zope cannot be robust against programmer error. Nothing can. I, as a programmer, develop Zope products. My users install them on their system. If your users are programmers then this comment is relevant, but I dont. Adding a property to an object (using the Property tab in the management interface) is a user-level operation. I do expect my systems to be robust against user error. (Note that it is even possible to 'break' Zope's own management interface by adding some carefully named properties. Some of those are even WikiNames ;-) * someone uses self.Zoo.Diet.buildings.visitor_reception.feed(), and ends up filling the reception with hippo food. (This might even be possible for someone who has no permissions on the reception object) This is once again programmer error. Do you mean the programmer who implemented 'feed'? If yes, Im pleased you agree with me. Their mistake was to use acquisition instead of inheritance. If they wanted to use acquistion then they would need to augment their otherwise simple implementation of 'feed' with either: 1. Explicit security checks (hard to get right) 2. Explicit is_instance checks (inflexible) 3. Accept the fact that anyone granted the 'Feed Hippos' permission on any hippo may dump hippo feed anywhere, or feed other hippos for which they do not have that permission. Perhaps the hippo analogy isnt helping, so heres a more concrete example. In zope today it is possible for a user who has been granted the 'View Management Screens' permission in *one* folder to create a one-line dtml method that lets him see the management page of any other dtml method in the whole site. Why? because DTMLMethod's manage_main binds to context not containment. * someone uses self.Zoo.buildings.office.printers.laserjet1.Zoo.Diet.LargeAni mals.hippo.feed(), and ends up feeding paper to the hippo. (that could even be someone who has no other permisions on that hippo object) This is the same as your first two arguments: programmer error. (Note: Michel is right that this one is not immediately relevant to the binding discussion; its purely a demonstration of a misuse of acquisition. Its also a programmer error, but in Michel is that programmer) The real problem here is that you are relying on acquisition from a context that is not a direct container. Each instance only has one containment heirarchy. However it has an infinite number of possible contexts, which are chosen by the caller. Suppose you have an (apparently correct) external method in Zoo: def feeding_time(self): self.Diet.LargeAnimals.hippo.feed()
[Zope-dev] Security Confusion :-S
If anyone can help me with this, it'd give me more faith in the new security model :-S Right, I have a Python Product Class (lots of bits left out ;-): class MyProduct(OFS.SimpleItem.SimpleItem): """... """ __ac_permissions__=( ('Use MyProduct' ,('a_method',),('Manager',)), ) a_methodisDocTemp=1 def a_method(self,ignored,md): list = [] for name in self.get_contents(): list.append(DisplayClass(name,self)) return list The important bits of DisplayClass look like: class DisplayClass(Globals.Persistent): """ """ __allow_access_to_unprotected_subobjects__=1 meta_type = 'CaseDisplay' __ac_permissions__=( ('View',('get_name',),('Anonymous',)), ) ... def get_name(self): return self._name Now, I have a DTML method which goes like: dtml-with an_instance_of_MyProduct dtml-in a_method Bdtml-var sequence-item html_quote:/B dtml-var get_nameBR /dtml-in /dtml-with Which _always_ throws up an authentication box when a_method returns anything except an empty list. no matter what username or password I use, that box still appears. What I would like is for the get_name and a_method methods to be mapped to permissions so I can manage access to them using the security tab. How should I do that? BTW, in an attempt to get the method accessible in _some_ way I have tried: - setting __allow_access_to_unprotected_subobjects__=1 in both the MyProduct and DisplayClass classes. - setting get_name__roles__=None in the DisplayClass. - giving every conceivable permission to both the Anonymous and Manager roles in the folder containing the MyProduct instance None of which feel like a good way to go, but nevertheless, none of them worked. The only way I coudl solve the problem was to give the DTML Method the 'Manager' proxy role, then everything worked fine. Why is that? What's _is_ going on? Confused and Frustrated (isn't that always the way with Zope security?!) Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Python 2.0 and Zope Status?
On 20 Oct 2000 19:09:47 GMT, [EMAIL PROTECTED] (Ty Sarna) wrote: What's the current state of Zope with Python 2.0? My current understanding of the issues is: - Problem with ExtensionClasses and 2.0's circular reference GC. Can someone elaborate on this? Is configuring python2.0 with That used to be a problem with some early cvs release, but it seems to have gone away now. Note that ExtensionClasses do not yet participate in the gc machinery, so cycles involving them can still not be collected. the --without-cycle-gc flag a sufficient workaround for now? I suggest this is the first thing you try if python faults during startup. - Python 2.0's cPickle and cStringIO should be used instead of the Zope-supplied versions. Yes. Is that it? Anything else I'm missing? There are several places where Zope is not defending against objects which raise an exception inside str(). This has not been a problem up to now, but 2.0's unicode objects expose the problem. The most serious possible effect is of terminating a publisher thread. Fixes for these bugs are bundled into my patches to support Unicode, at http://www.zope.org/Members/htrd/wstring Other than that, 2.0 is great. Ive been using it extensively for several months now without problem. Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] Reference to a user
If I want to store a reference to a User in Zope, what's the best way to do it? I'm currently storing just the user's name, which doesn't seem very robust. Perhaps there's a more conrete reference to the user object? How about a path or something? Is there an interface for this anywhere? I guess something would have been needed for the ownership stuff? Any ideas gratefully recieved :-) You might want to look at the 'ownerInfo' method in lib/python/AccessControl/Owned.py. That produces a fully qualified 'path' to identify a user. It probably should be made an interface on the user object itself (it probably was done this way initially to avoid forcing authors of other user sources to implement a new method or be broken). Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Task, Job or Operation?
Huh. We're looking for something neutral, to connote code that runs in zope to do some business logic or similar effect. It should distinguish the language used to express the logic - perl vs python vs xslt, etc. I hate "script", but it occurs to me that the "-let" convention may be useful: Python Zopelet Perl Zopelet XSLT Zopelet Zope-specific, runs on the server, shows the implementation language, won't be confused with non-remotely-editable functions, methods, scripts, code in general. This is the first one with which i'm comfortable - but i may well have missed something. Ken [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Meaning :-S
Ken Manheimer wrote: Huh. We're looking for something neutral, to connote code that runs in zope to do some business logic or similar effect. It should distinguish the language used to express the logic - perl vs python vs xslt, etc. I hate "script", but it occurs to me that the "-let" convention may be useful: Python Zopelet Perl Zopelet XSLT Zopelet Zope-specific, runs on the server, shows the implementation language, won't be confused with non-remotely-editable functions, methods, scripts, code in general. This is the first one with which i'm comfortable - but i may well have missed something. ...yeah, Zopelet means absolutely nothing, and will just add to confusion :-( Chris . o O ( what the hell is a Zopelet? ;-) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Reference to a user
Brian Lloyd wrote: You might want to look at the 'ownerInfo' method in lib/python/AccessControl/Owned.py. That produces a fully qualified 'path' to identify a user. It probably should be made an interface on the user object itself (it probably was done this way initially to avoid forcing authors of other user sources to implement a new method or be broken). Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com So, the following code (in a python product ;-) should get me a persistent reference to the user that I can store, say, in an SQL database: from AccessControl import getSecurityManager,Owned the_current_user_path = Owned.ownerInfo(getSecurityManager().getUser()) Which leaves me with one other question ;-) How do I turn the_current_user_path into a User object which I can use in the following: print the_user.getUserName() print the_user.getRoles(an_object) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Meaning :-S
On 10/23/2000 11:37 AM, "Chris Withers" [EMAIL PROTECTED] wrote: ...yeah, Zopelet means absolutely nothing, and will just add to confusion :-( The worse confusion is choosing a name that means something and then either o Having to explain that it means different things in different contexts, even within Zope. (This is a bigger problem with the name Method than the whole binding issue. Ditto for script. Instructing a user to write a Python Script will cause a Python programmer to go to the file system). o Having to explain "it's like ... but different..." This was apparently one of the other problems with the name Method, in that PythonMethods (the through-the-web variety) may or may not behave like traditional Methods in programming languages. This is especially bad when the code is Python since Python is also what we develop in. Python can now exist in many places in Zope (web, Extensions/, and Products (disk based)). External Methods were a nice name in that they connoted that it was a chunk of code that was external to Zope (at least the ZODB). The use of 'method' can come back into issue regarding how they got bound (ugh), but the External bit fit. If I was told "write an External method", I knew what that meant. When*ever* I hear someone mention writing a new python method to do something, it has to be qualified with "you mean in a product\class on the file system or a _PythonMethod_?" Function, Script.. They all fall prey to the same thing. Zopelets follows the cute naming of Applet, Servlet, Scriptlet... (IE has Scriptlets). I'm not advocating it entirely, but it follows a nice silly tradition in a way that is explainable - small chunks of Zope code managed through the web. And they happen to be in Python. (or could be predicated by the language of choice). Jeffrey P Shell, [EMAIL PROTECTED] http://www.digicool.com/ | http://www.zope.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] PythonPiece, perlpiece. You can use the Big PP or the little pp!
Is it not just another piece of the puzzle to figure out? :-) Get your Free E-mail at http://tacoma.zzn.com Get your own Web-Based E-mail Service at http://www.zzn.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] (no subject)
Hi Name Hunters, My problem with Zopelet is that it already has a meaning, at least to me. Looking down the road, not nearly as far as one might imagine, let's see where we may be heading. Think about minimal Zope instances running on Palm Gizmos, Cell Phones, whatever, a sort of personal ZEOClient, that enables offline or intermitent access to Zope Applications (e.g. WorldPilot). That's a Zopelet to me, a "little Zope". As for the other suggestions, "Op" sounds right to me. An Operation, or an Operative carrying out some work on behalf of the caller. Python Op, Perl Op, XSLT Op. It's short too! Also, Safe is clear, and easy to grasp, since most folks are aware how critical security can be. As for Flexible vs. UnSafe, how about "Direct", as in, "running directly from the file system"?. The term implies a trade-off of power for some degree of insecurity, at least to the initiated. Newbies should be warned away if they don't get the connotation. This leads to: Direct Python Op, etc. Later, Jerry S. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Task, Job or Operation?
Sorry for the duplicate post, forgot the subject. :) Hi Name Hunters, My problem with Zopelet is that it already has a meaning, at least to me. Looking down the road, not nearly as far as one might imagine, let's see where we may be heading. Think about minimal Zope instances running on Palm Gizmos, Cell Phones, whatever, a sort of personal ZEOClient, that enables offline or intermitent access to Zope Applications (e.g. WorldPilot). That's a Zopelet to me, a "little Zope". As for the other suggestions, "Op" sounds right to me. An Operation, or an Operative carrying out some work on behalf of the caller. Python Op, Perl Op, XSLT Op. It's short too! Also, Safe is clear, and easy to grasp, since most folks are aware how critical security can be. As for Flexible vs. UnSafe, how about "Direct", as in, "running directly from the file system"?. The term implies a trade-off of power for some degree of insecurity, at least to the initiated. Newbies should be warned away if they don't get the connotation. This leads to: Direct Python Op, etc. Later, Jerry S. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZCatalog + ZCatalog
I am making it my mission to enhance the beast that is ZCatalog. This is the first of many improvements I hope to make to it as time goes on. DISCLAIMER This patch has only been moderately tested, and all side affects are not known. I am submitting it here for review before adding it to the collector. You take full risk in using this patch on your installation. /DISCLAIMER OK, what this patch does is allow you to concatenate ZCatalog result sequences (Lazy sequences) without loading the whole enchilada into memory. It also dispenses with the funky workaround/hack notation that currently exists (although it still works AFAIK). Once this patch is in place, you will be able to write code as follows: dtml-in "Catalog(args)+Catalog(other args)+..." ... /dtml-in or even: dtml-in "Catalog1(args)+Catalog2(args)" ... /dtml-in The latter might be useful for dealing with ZCatalog scaling issues, or combining completely objects from entirely different locations. The patch changes Lazy.py and Catalog.py (very slightly). These files can be found in your {Zopedir}/lib/python/Products/ZCatalog directory. Add the following code into the Lazy class definition in Lazy.py. I added it at the end following line 118 (slice=__getslice__): def __add__(self,other): # Concatenate result sequences together while remaining lazy # Make sure the object we are concating is also Lazy try: if other.__class__.__bases__[0].__name__ != 'Lazy': raise TypeError, """Cannot concatenate objects. Both must be lazy result sequences (ie ZCatalog results)""" except: raise TypeError, """Cannot concatenate objects. Both must be lazy result sequences (ie ZCatalog results)""" if self.__class__.__name__ == 'LazyCat': # Don't nest LazyCat objects unnecessarily if hasattr(self,'_seq'): seq = self._seq else: seq = [self._data] else: seq = [self] if other.__class__.__name__ == 'LazyCat': # Don't nest LazyCat objects unnecessarily if hasattr(other,'_seq'): seq = seq + other._seq else: seq = seq + [other._data] else: seq = seq + [other] return LazyCat(seq) The change to Catalog.py is a single line as follows: Change line 603 (if not r: return r) to: if not r: return LazyCat(r) The change to Catalog.py prevents empty catalog search results from throwing an exception when concatenating it with a non-empty search result. This is the only part that I see as a risk to break existing code. If you, for whatever reason, relied on a ZCatalog returning an empty list ([]) when the search came up empty, your code will no longer work. Here is an example: dtml-let result="Catalog(args)" dtml-if "result == []"--- This no longer works ... dtml-else ... /dtml-if /dtml-let However this still does: dtml-let result="Catalog(args)" dtml-if result ... /dtml-if /dtml-let And this does what you expect of it when both searches come up empty: dtml-in "Catalog(args)+Catalog(other args)" ... dtml-else ... /dtml-in IMHO this is a very minor side affect, and well worth the gain. Please scrutinize this patch and pick it apart and let me know what works and what doesn't or if I've missed something. Enjoy, Casey Duncan ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Task, Job or Operation?
On Mon, Oct 23, 2000 at 03:07:25PM -0700, James Johnson wrote: Is there a Wiki or some other starting point for this thread. As a newbie I like safe vs power over anything else. I also understand that with using anything in a power mode can be risky for a newbie. It's nice to know that I can start out learning in a safe mode and then graduate to a power mode after learning more. Is there a ZopeScript and why not? Safe ZopeScript can be written in using other scripting languages. Zopelet imho is not as marketable as ZopeScript. OK, this is the problem. There are several ways of writing executable code available to other objects in Zope. One is the Python Method. It is available from http://www.zope.org/Members/4am/PythonMethod From 4am's page: PythonMethods will not allow assignment to an attribute, element, or slice. No "del" is allowed. Names starting with "_" are not accessible. Import is controlled. Globals all live in a private namespace. There is a proposal to call this construct a Zope Script. And your message is exactly the ammunition I wanted. Thanks! The other way to script in python is currently called an External Method. Since perl is being added as a Zope scripting option, this will clearly have to be renamed, as well. External Methods have none of the restrictions of PythonMethods. This makes it quite easy to escape all Zope security, to crash Zope, and to do other nasty things. Needless to say, Zope hosting sites do not generally provide External Methods. There is no ZopeScript, and probably never will be. What would ZopeScript do? Would it be a construct like JavaScript that was executed on the client's computer? If so, every browser vendor would have to support it. This is unlikely, to say the least. Is it server side? Then DTML, PythonMethods (to be renamed), PerlMethods (which don't exist yet), External (Python) Methods, External Perl Methods (which also don't exist yet) give plenty of scripting options, without the need for another language. It is not at all clear that Safe scripting methods (in the strong sense meant here, meaning that it can neither damage the client nor the server), can be written in languages other than Python (I have heard some doubts expressed about perl). And, there is generally no need to "graduate" to external (power) methods. You only need to use an external method when you need a module not imported by Zope (not available through the _ namespace). So, you have written several things in your message that really bolster my dislike for both zope script and power as terms. 1) You have gone from the word Zope Script to a separate language ZopeScript in a single bound. 2) You have assumed that you will want to "graduate" from Safe Methods to "Power" Methods (You don't, external methods are last resort options). 3) "Power" methods don't require a lot more learning than Safe Methods. You have to learn what modules are available, but you are using the same language in either case! Maybe my suggeston of flexible is to weak. Maybe they should be Escape Hatch Python Operations (Escape Hatch Python Zopelets)! When you call it operation, method, or function it takes it away from it's context. This is zope specific right? Excuse me while I use safe ZopeScriptPython or power ZopeScriptPerl. Not really Zope specific in the sense you mean. It is an object (not in the OO meaning) that can be called from a Zope site. But the language is pure Python (perl), with no modifications, and usually can be snipped and executed outside of Zope. Get your Free E-mail at http://tacoma.zzn.com Get your own Web-Based E-mail Service at http://www.zzn.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Unit testing, ZUnit
We (I and Hiperlógica) started to develop a Product we called ZUnit, intended for XP-style unit-testing Python-based Products in a full Zope environment (with a real ZODB, REQUEST, RESPONSE, etc). We first conceived it as a kind of Zope-based version of unittestgui.py - you create a "TestRunner" object giving it the package, module and name of a TestSuite object generator (see the PyUnit documentation) and inside it you may click on some widget to run the tests and produce a "TestResult" object which you can inspect later. Does this sound like a good design? Then I figured in the long run a Product isn't the best sollution; instead, fiddling with App/Product* sounds more like it, to allow developers to register tests just like they register classes, ZClass superclasses, _misc and help. Of course, just like the current registerHelp and others, it wouldn't be mandatory and not using it wouldn't break anything. Then, in the Product's page in the Control Panel, there would be a tab "Test", where you'd be allowed to run the unit tests. What do people think of this? What does DC think of this? Can I go ahead and develop it in this direction? (I will create a proposal in dev.zope.org, but I want to get some feedback here first to flesh out the proposal a little more.) []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit
I would be very interested in such a beast. It's way too hard to do unit testing in Zope right now. I'm not sure about how it should be designed, but that's what the fishbowl is for. :-) - Original Message - From: "Lalo Martins" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 8:56 PM Subject: [Zope-dev] Unit testing, ZUnit We (I and Hiperlógica) started to develop a Product we called ZUnit, intended for XP-style unit-testing Python-based Products in a full Zope environment (with a real ZODB, REQUEST, RESPONSE, etc). We first conceived it as a kind of Zope-based version of unittestgui.py - you create a "TestRunner" object giving it the package, module and name of a TestSuite object generator (see the PyUnit documentation) and inside it you may click on some widget to run the tests and produce a "TestResult" object which you can inspect later. Does this sound like a good design? Then I figured in the long run a Product isn't the best sollution; instead, fiddling with App/Product* sounds more like it, to allow developers to register tests just like they register classes, ZClass superclasses, _misc and help. Of course, just like the current registerHelp and others, it wouldn't be mandatory and not using it wouldn't break anything. Then, in the Product's page in the Control Panel, there would be a tab "Test", where you'd be allowed to run the unit tests. What do people think of this? What does DC think of this? Can I go ahead and develop it in this direction? (I will create a proposal in dev.zope.org, but I want to get some feedback here first to flesh out the proposal a little more.) []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Meaning :-S
Chris Withers wrote: Ken Manheimer wrote: Huh. We're looking for something neutral, to connote code that runs in zope to do some business logic or similar effect. It should distinguish the language used to express the logic - perl vs python vs xslt, etc. I hate "script", but it occurs to me that the "-let" convention may be useful: Python Zopelet Perl Zopelet XSLT Zopelet Zope-specific, runs on the server, shows the implementation language, won't be confused with non-remotely-editable functions, methods, scripts, code in general. This is the first one with which i'm comfortable - but i may well have missed something. ...yeah, Zopelet means absolutely nothing, and will just add to confusion :-( Chris . o O ( what the hell is a Zopelet? ;-) I have to say that I don't like Zopelet either. I guess nobody else likes my 'Blocks' nomenclature: Python Blocks Perl Blocks DTML Blocks As I mentioned before, I tend to use DTML Methods in two contexts: - as Views on objects (Templates) - as building blocks for Views In one context (Views/Templates), the DTML method is meant to be accessed directly through the web. In the other context (Block), the DTML method is only ever accessed by a View. I would actually like to have a Block object that is not directly accessible, without having to go through some proxy-role rigamarole. Something else to consider for these two Use Cases of DTML/Python/Perl Methods/Blocks/Scripts, is that typically only the Block Use-Case is expected to be re-used through recomposition, as well as acquisition, while Templates/Views are usually re-used through Acquisition only. I'm not sure this has any impact on the 'Method Binding' argument floating around, but I thought I'd mention it again in that context. HTH, Michael Bernstein. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Security Confusion :-S
On Mon, 23 Oct 2000 15:59:24 +0100, Chris Withers [EMAIL PROTECTED] wrote: (untested hints to follow) class MyProduct(OFS.SimpleItem.SimpleItem): """... """ __ac_permissions__=( ('Use MyProduct' ,('a_method',),('Manager',)), ) a_methodisDocTemp=1 def a_method(self,ignored,md): list = [] for name in self.get_contents(): list.append(DisplayClass(name,self)) list.append(DisplayClass(name,self).__of__(self)) return list The important bits of DisplayClass look like: class DisplayClass(Globals.Persistent): class DisplayClass(Globals.Persistent, Acquisition.Implicit): """ """ __allow_access_to_unprotected_subobjects__=1 meta_type = 'CaseDisplay' __ac_permissions__=( ('View',('get_name',),('Anonymous',)), ) Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit
What do people think of this? you get my vote kapil ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] The Great Python (and Perl) Method Renaming Poll
We will be conducting a community poll to decide what to call Python (Perl, insert your language here) Methods. Many candidates have been discussed, but I'm afraid I don't have enough time to cull all the candidates from the discussions. So, before the poll, we are calling for nominiations from the community. Please send me an email containing one or more candidate names. These names will be added to the list. No pre-screening will be done, so please exercise some discretion if your favorite name is more tounge-in-cheek than practical (you never know what the masses will decide though!). Later this week, I will create a web poll where you can vote for your favorite. thanks, -Michel ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope] NEWBIE: assign next free ID automatically
This is untested, but an idea: dtml-in "objectValues()[:-1]" sort=id reverse dtml-call "REQUEST.set('new_id', id+1)" dtml-var new_id It is still subject to failure if 2 or more processes are writing an article in the same time. Furthermore it has to find and sort all the items in the folder. That could take a long time if there are lots of them. Maybe you should somehow insert a dtml-try until you succed in writing the article. Another aproach would be to have the folder with your articles have a property "lastID" and let "nexID" be a method that automatically would increment lastID end return it. Maybe it is possible to lock the lastID property?? From: Patrick Koetter [mailto:[EMAIL PROTECTED]] What is it that I want to do? I want to evaluate the highest ID (all are 'int') within the folder and assign the next highest. I'm sure this is easy to you... ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with mysql and sql methode
MySQL is case-sensitive over table names, so MERCHANTPAYMENT is not the same as merchantpayment. Other databases (Postgresql, Informix) are not. Perhaps the Access/ODBC interface hides the case-sensitivity while the direct ZMySQLDA does not ? Hmm, I'm not very clear about differences between handling of (table, column) names in sql-databases, but postgres IS case sensitive (in some sense). Few days ago I wrote to messages to this list describing my problems with postgres and capitals in column-names. The handling of these will render dtml-sqltest .. useless, because it doesn't quote the name of the vars. I that case postgres will not respect capital letter (will turn them lowercase) but also won't find the column which name is written uppercase. I think it would be usefull to collect the behaviour of different databases and try to find a solution which will work with all of them. The solution we have now clearly doesn't do that. cheers, oliver ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Working with versions
Hallo, I've got a question concerning versions. The working with versions in the management screen is obvious to me, but what about hiding the management-screen and working with them. I want to add ZClasses programmatically but some users should only be able to add them after a Controller has checked that everything is o.k. What are the right methods to use??? -- Sent through GMX FreeMail - http://www.gmx.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Working with versions
Hi... You need to open a versioned database connection manually. This is probably harder than it should be. For more info, see http://www.zope.org/Documentation/Developer/Models/ZODB and look under Architecture -- DB. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 5:06 AM Subject: [Zope] Working with versions Hallo, I've got a question concerning versions. The working with versions in the management screen is obvious to me, but what about hiding the management-screen and working with them. I want to add ZClasses programmatically but some users should only be able to add them after a Controller has checked that everything is o.k. What are the right methods to use??? -- Sent through GMX FreeMail - http://www.gmx.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie questions ?
Hi, I spent my week-end learning how to use Zope, it was a nice painful experience. Nice thanks to Zope itself, painful because of the poor docs. The How-Tos helped me a lot but it is a real mess. Here are two questions I did not find the answers : - how to ask for authentification to see my web pages (not manage, just see) ? In Apache one has to put a .htaccess file in the directory. - how to limit the size a folder ? I want to give login to friends so they can add photos in a folder but I don't want to receive more than 200MB of data in this folder. Thanks, Olivier. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] GET requests in Medusa web server
Hello all, Why does the Medusa server in Zope not handle GET requests which specify a full URI? For example, if I have a web server running on web.mydomain.com, and I want to get a file called "file.html", doing a GET request of the form GET http://web.mydomain.com/file.html HTTP/1.1 gives me a 404. Doing a GET of the form GET /file.html HTTP/1.1 works fine. If I understand RFC 2068 correctly, a HTTP 1.1 compliant server is expected to handle both cases (5.1.12 of RFC 2068), although HTTP 1.1 clients are not supposed to generate these unless talking to a proxy. In our case, the software which generates the request is a WAP gateway (Ophelia, http://www.3ui.com), and it always assumes it is talking to a proxy server, and requires a code change to change it. I've tested Apache and IIS with this, and they handle both forms. Thanks in advance. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
Hi, I spent my week-end learning how to use Zope, it was a nice painful experience. Nice thanks to Zope itself, painful because of the poor docs. The How-Tos helped me a lot but it is a real mess. We know. :-) Have you checked out the Zope book? http://www.zope.org/Members/michel/ZB/. Here are two questions I did not find the answers : - how to ask for authentification to see my web pages (not manage, just see) ? In Apache one has to put a .htaccess file in the directory. This answer is definitely in the Zope book. If it's not, there's the (unfinished) chapter of the Zope Product Developer's Guide Security chapter at http://www.zope.org/Members/mcdonc/PDG/6-1-Security.stx. - how to limit the size a folder ? I want to give login to friends so they can add photos in a folder but I don't want to receive more than 200MB of data in this folder. There is no quota support in Zope. You'd need to write code to enforce a constraint on total upload size. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with mysql and sql methode
At 09:41 23/10/00, you wrote: MySQL is case-sensitive over table names, so MERCHANTPAYMENT is not the same as merchantpayment. Other databases (Postgresql, Informix) are not. Perhaps the Access/ODBC interface hides the case-sensitivity while the direct ZMySQLDA does not ? Hmm, I'm not very clear about differences between handling of (table, column) names in sql-databases, but postgres IS case sensitive (in some sense). Well I'm confused !!! I have two databases , one MySQL (3.23.25) one PostgreSQL (7.01), both with the same schema. Both have a table 'artist'. The following SQL Method (Zope 2.2.1) works with both select a.artist_id,a.known_name,a.initials from artist a where dtml-sqltest surname type=string Change this to select a.artist_id,a.known_name,a.initials from ARTIST a where dtml-sqltest surname type=string it still works with PostgreSQL but with MySQL I get "Table 'tunedb.ARTIST' doesn't exist" Change this to select a.artist_id,a.known_name,a.initials from ARTIST a where dtml-sqltest SURNAME type=string Then it still works with PostgreSQL, provided you also change the argument to the SQL Method from surname to SURNAME. When you click on the Test tab of an SQL Method it shows the SQL generated and you can see, in the above example, that the uppercase words are passed through unchanged to the database viz. select a.artist_id,a.known_name,a.initials from ARTIST a where SURNAME = 'Molloy' In what circumstances is PostgreSQL case-sensitive ? Richard Few days ago I wrote to messages to this list describing my problems with postgres and capitals in column-names. The handling of these will render dtml-sqltest .. useless, because it doesn't quote the name of the vars. I that case postgres will not respect capital letter (will turn them lowercase) but also won't find the column which name is written uppercase. I think it would be usefull to collect the behaviour of different databases and try to find a solution which will work with all of them. The solution we have now clearly doesn't do that. cheers, oliver ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZCatalog question
Hi Folks, i have a ZCatalog over a bunch of items with attributes A and B. Now I want to search all elements with attribute A set to value 1 and AT THE SAME TIME with attribute B set to value 2. So a sort of AND combination with two different attributes. How to do ? Regards oliver --- "All language designers are arrogant. Goes with the territory..." (By Larry Wall) --- Oliver Pabst .-. mailto:[EMAIL PROTECTED]: : phone :+49 681 56600600 :project department : SYBCOM GmbH fax :+49 681 56600660 : : http://www.sybcom.de ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Working with versions
Hallo Chris, thank you for your reply, but I don't understand what I have to do. I looked into the documentation but it is obscure to me. Sven = Original Message From "Chris McDonough" [EMAIL PROTECTED] = Hi... You need to open a versioned database connection manually. This is probably harder than it should be. For more info, see http://www.zope.org/Documentation/Developer/Models/ZODB and look under Architecture -- DB. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 5:06 AM Subject: [Zope] Working with versions Hallo, I've got a question concerning versions. The working with versions in the management screen is obvious to me, but what about hiding the management-screen and working with them. I want to add ZClasses programmatically but some users should only be able to add them after a Controller has checked that everything is o.k. What are the right methods to use??? -- Sent through GMX FreeMail - http://www.gmx.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with mysql and sql methode
At 09:41 23/10/00, you wrote: Hmm, I'm not very clear about differences between handling of (table, column) names in sql-databases, but postgres IS case sensitive (in some sense). Well I'm confused !!! I have two databases , one MySQL (3.23.25) one PostgreSQL (7.01), both with the same schema. Both have a table 'artist'. The following SQL Method (Zope 2.2.1) works with both select a.artist_id,a.known_name,a.initials from artist a where dtml-sqltest surname type=string Change this to select a.artist_id,a.known_name,a.initials from ARTIST a where dtml-sqltest surname type=string it still works with PostgreSQL but with MySQL I get "Table 'tunedb.ARTIST' doesn't exist" Change this to select a.artist_id,a.known_name,a.initials from ARTIST a where dtml-sqltest SURNAME type=string Then it still works with PostgreSQL, provided you also change the argument to the SQL Method from surname to SURNAME. When you click on the Test tab of an SQL Method it shows the SQL generated and you can see, in the above example, that the uppercase words are passed through unchanged to the database viz. select a.artist_id,a.known_name,a.initials from ARTIST a where SURNAME = 'Molloy' In what circumstances is PostgreSQL case-sensitive ? First, sorry for my (nearly) full-quote, but I think it makes this discussion more readable. To your question, from my testing (I did this with column names only, but I suspect the same behavior for table-names), postgres is case sensitive, but - as I wrote - in another sense. If you don't quote the column-names, they are converted to or interpreted as lowercased names. _But_ if the real name of the table/column is _uppercase_, it will not be matched by this lowercased name - in this sense postgres is case-sensitive. Postgres needs quoted names in sql-queries to respect capitalization (sp?) - and I couldn't dtml-sqltest ... get to generate them. This was a major problem for me, because I had to work with a bunch of tables which were exported from foxpro and dbase, and their names were uppercased in the process. cheers, oliver ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Almost there, but I am still having a little problem
Thank you all for helping me out. The hints got me almost there. I have one unsolved mystery left. What I am trying to do is print the titles from the DTML Documents in the 'artikelen' folder (and actually another property called 'inleiding'. I believe the code below should do this, but it does not work. It returns 'Zope' instead of the title. If I use the 'inleiding' property it reports that it does not exist. If I just use sequence-item it returns the complete item ok. Any clues ? Thanks, Taco http://www.gezondheidskrant.nl:8080/mainframe : dtml-let articleList="[]" dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf dtml-call "articleList.append(_['sequence-item'])" /dtml-in dtml-in "articleList[-4:]" reverse dtml-let theDocument=sequence-item dtml-var "theDocument.title" dtml-var "theDocument.inleiding" /dtml-let /dtml-in /dtml-let 1stUp.com - Free the Web Get your free Internet access at http://www.1stUp.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] again: install Zope under Solaris 8
Hi, I just want to resume a thread from september. Has anyone else encountered problems installing Zope (in our case 2.2.2) under Solaris 8? And more important: Do you know a solution? Python is unable to import the ExtensionClass. I tried it from commandline (python 1.5.2 (#1, Oct 19 2000, 13:55:34) [GCC 2.95.3 19991030 (prerelease)] on sunos5) also and got the same Import Error: --- command and traceback following [~/Zope-2.2.2] ./start Traceback (innermost last): File "/./Zope-2.2.2/z2.py", line 554, in exec "import "+MODULE in {} File "string", line 1, in File "/./Zope-2.2.2/lib/python/Zope/__init__.py", line 94, in import ZODB, ZODB.ZApplication, imp File "/./Zope-2.2.2/lib/python/ZODB/__init__.py", line 85, in import sys, ExtensionClass, TimeStamp, cPersistence, Persistence ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /mnt/disk2/homes/wklinik/Zope-2.2.2/lib/python/ExtensionClass.so: symbol PyImport_ImportModule: referenced symbol not found -- Thanks, Thies Bähr. -- --- Jan-Thies Bähr Intelligent Visualization Simulation DFKI GmbHEmail: [EMAIL PROTECTED] D-67608 Kaiserslautern (Germany) Phone: +49 (0) 631 205-4565 --- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] a problem with 'start' command
hi all, I am a starter with Zope and i have a simple question. I need to execute 'start' command to start the server again. when i tried to do it, it gives me the message: command not found I looked at the directory, i can find the start command, and the permissions are -rwx--x--x. Can somebody help me with this ? Thanks Gaby ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope 2.2.2 breaks YihawDirectory ?
When installing the actual Version of YihawDirectory (http://www.zope.org/Members/Roug/Yihaw) by importing it into a 2.2.2 Zope, I got the following traceback. This happens both with and without the current hotfixes. Importing it into 2.2.1 equipped with the current hotfixes works without flaws. Any ideas what's going on here? I don't want to go back to 2.2.1 :-/ snip Zope has encountered an error while publishing this resource. Error Type: Could not load oid 5, pickled data in traceback info may contain clues Error Value: None Traceback (innermost last): File E:\var\disk2\sites\WEBSIT~2\lib\python\ZPublisher\Publish.py, line 222, in publish_module File E:\var\disk2\sites\WEBSIT~2\lib\python\ZPublisher\Publish.py, line 187, in publish File E:\var\disk2\sites\WEBSIT~2\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File E:\var\disk2\sites\WEBSIT~2\lib\python\ZPublisher\Publish.py, line 171, in publish File E:\var\disk2\sites\WEBSIT~2\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_importObject) File E:\var\disk2\sites\WEBSIT~2\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_importObject) File E:\var\disk2\sites\WEBSIT~2\lib\python\OFS\ObjectManager.py, line 526, in manage_importObject (Object: Traversable) File E:\var\disk2\sites\WEBSIT~2\lib\python\OFS\ObjectManager.py, line 278, in _setObject (Object: Traversable) File E:\var\disk2\sites\WEBSIT~2\lib\python\OFS\ObjectManager.py, line 286, in manage_afterAdd (Object: Traversable) File E:\var\disk2\sites\WEBSIT~2\lib\python\ZClasses\ZClass.py, line 421, in manage_afterAdd (Object: YihawChannel) File E:\var\disk2\sites\WEBSIT~2\lib\python\ZClasses\ZClass.py, line 374, in _register (Object: YihawChannel) File E:\var\disk2\sites\WEBSIT~2\lib\python\ZODB\Connection.py, line 447, in setstate File E:\var\disk2\sites\WEBSIT~2\lib\python\ZODB\Connection.py, line 213, in _persistent_load (Info: 5) File E:\var\disk2\sites\WEBSIT~2\lib\python\ZODB\Connection.py, line 154, in __getitem__ (Info: ('\000\000\000\000\000\000\0225', '(cExtensionClass\012ExtensionClass\012q\001(U\013EventFolderq \002(cZClasses.ZClass\012PersistentClass\012q\003cProducts.Re nderable.Renderable\012Renderable\012q\004cZClasses.ObjectMa nager\012ObjectManager\012q\005cOFS.SimpleItem\012SimpleIte m\012q\006tq\007}q\010(U\016searchMaxItemsq\011U\00250q\012 U\004helpq\013(U\010\000\000\000\000\000\000\022jq\014(U\017ZC lasses.Methodq\015U\003MWpq\016ttq\017QU\012titleColorq\020U \007#ccq\021U\016contextMessageq\022U\011Event Logq\023U\024validateDocumentFormq\024(U\010\000\000\000\000 \000\000\022Jq\025(h\015U\003MWpq\026ttq\027QU\006_p_oidq\0 30U\010\000\000\000\000\000\000\020=q\031U\012yearBreaksq\03 2U\0013U\014titleFgColorq\033U\007#00q\034U\011meta_type q\035U\013EventFolderq\036U\012__module__q\037U\031*RPVpt5 0D1IjExz+kMxPcyw==q U\012index_htmlq!(U\010\000\000\000\000\000\000\022Kq"(h\015U\ 003MWpq#ttq$QU\012useOverlibq%U\000U\011adder_gifq(U\010\ 000\000\000\000\000\000\022Lq\'(h\015U\003MWpq(ttq)QU\016neat ManageViewq*(U\010\000\000\000\000\000\000\022Mq+(h\015U\00 3MWpq,ttq- QU\013eventSearchq.(U\010\000\000\000\000\000\000\022Nq/(h\01 5U\003MWpq0ttq1QU\022__ac_permissions__q2((U\022Add EventDocumentsq3)(U\007Managerq4tq5t(U\017Add EvDocAddersq6)h5t(U\016Add EvDocDatesq7)h5ttq8U\013newAddendumq9(U\010\000\000\000\00 0\000\000\022Oq:(h\015U\003MWpq;ttqQU\013renderMonthq=(U\ 010\000\000\000\000\000\000\022Pq(h\015U\003MWpq?ttq@QU\ 014titleBgColorqAU\007#ccqBU\004iconqCU9Control_Panel/Prod ucts/EventFolder/EventFolder/ziconImageqDU\011webmasterqEU\0 [EMAIL PROTECTED]\010nicknameqGU\011Event LogqHU\023docGridDisplayColorqIU\007#ccqJU\017mgmt_bat ch_sizeqKU\00220qLU\014deleteEventsqM(U\010\000\000\000\000\ 000\000\022QqN(h\015U\003MWpqOttqPQU\010year_tokqQ]qR(U\ 0042000qSU\0042001qTeU\015lightbulb_gifqU(U\010\000\000\000\0 00\000\000\022RqV(h\015U\003MWpqWttqXQU\012batch_sizeqYU \00225qZU\012dateSearchq[(U\010\000\000\000\000\000\000\022S q\\(h\015U\003MWpq]ttq^QU\006formccq_U\007#e0e0e0q`U\014ne wEventFormqa(U\010\000\000\000\000\000\000\022Uqb(h\015U\003 MWpqcttqdQU\014edListSearchqe(U\010\000\000\000\000\000\000 \022Vqf(h\015U\003MWpqgttqhQU\021makeBatcherStringqi(U\010\ 000\000\000\000\000\000\022Wqj(h\015U\003MWpqkttqlQU\016dat eRangeResetqm(U\010\000\000\000\000\000\000\022_qn(h\015U\0 03MWpqottqpQU\012renderYearqq(U\010\000\000\000\000\000\000 \022Hqr(h\015U\003MWpqsttqtQU\014allowPostingquU\002onqvU\0 13bordercolorqwU\007#33qxU\012_p_changedqyK\001U\007__ doc__qzU\037Folder to contain event objectsq{U\015maxTitleCharsq|K(U\013makeItAListq}(U\010\000\00 0\000\000\000\000\022[q~(h\015U\003MWpq\177ttq\200QU\011mo deratedq\201U\002onq\202U\016propertysheetsq\203U\010\000\000 \000\000\000\000\022]q\204QU\013eventReportq\205(U\010\000\00
[Zope] Updating auto incrementing counter in a propertysheet
What am I doing wrong here ... please !! I am trying to make an autoincrementing counter for use in a diskussion forum. It's purpose is to autogenereate id's for new messages. It is important that the id's are in order, so I need to make them this way. I have a zClass (objectmanger) with a property called "lastID", on a propertysheet called "hidden". I have then written a dtml mehtod that should return the id incremented by 1 and then sets the lastID to this new id. the dtml for the "newID()" dtml method looks like this: -- dtml-call "REQUEST.set('new_id', lastID+1)" dtml-call "REQUEST.set(lastID, new_id)" dtml-return "_.int(new_id)" -- When I try to get the property directly via the browser i get a result of "1" The default value for lastID=0 to begin with so this sounds plausible, but when I refresh the browser nothing happens. So I guess that lastID isn't updated in the above code. How do I do that? Also when I the try to insert "newID()" in my "mxm_comment_add" method in my zClass, to autogenerate numbers, like this: dtml-with "mxm_comment.createInObjectManager(newID(), REQUEST)" I get the following traceback: (And I would expect it to run at least 1 time with "1" as a new id.) Traceback (innermost last): File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 222, in publish_module File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\mxmZope\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: RoleManager) File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\mxmZope\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: index_html) File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: index_html) File C:\mxmZope\lib\python\App\Factory.py, line 178, in index_html (Object: RoleManager) File C:\mxmZope\lib\python\OFS\DTMLMethod.py, line 172, in __call__ (Object: mxm_comment_add) File C:\mxmZope\lib\python\DocumentTemplate\DT_String.py, line 528, in __call__ (Object: mxm_comment_add) File C:\mxmZope\lib\python\DocumentTemplate\DT_With.py, line 133, in render (Object: mxm_comment.createInObjectManager(newID(), REQUEST)) File C:\mxmZope\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval (Object: mxm_comment.createInObjectManager(newID(), REQUEST)) (Info: newID) File lt;stringgt;, line 0, in ? File C:\mxmZope\lib\python\OFS\DTMLMethod.py, line 168, in __call__ (Object: newID) File C:\mxmZope\lib\python\DocumentTemplate\DT_String.py, line 528, in __call__ (Object: newID) File C:\mxmZope\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval (Object: REQUEST.set('new_id', lastID+1)) (Info: REQUEST) File lt;stringgt;, line 0, in ? NameError: (see above) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sendmail examples
steve smith wrote: Anyone have any good, real-world examples using DTML-Sendmail tags? Would especially appreciate examples integrating SQL queries. hi steve. one of the worst things with zope sendmail is that you cannot indent things the way you might with clean coding use. but, you can use some very nice sql calls within you sendmail, including appropriate indentation. below is a sendmail method that i use to read a string of email address from a mysql database, and the text of the email from a second database, which gets parsed via an external python script (to parse the string of text into lines of = 75 chars, otherwise the text gets sent as single lines). also, it checks for non-existent email addresses or missing names (the database is a list of people and companies, whether connected to the net or not). it may not be the most efficient, but it works; and any suggestions as to making it more efficient will be most appreciated. ciao! greg. venaca.com ** clip dtml-var standard_html_header p dtml-in get_group dtml-call "REQUEST.set('counter',2)" dtml-let resp_num=sequence-item resp_x=sequence-index dtml-call "REQUEST.set('counter',resp_x)" dtml-call "REQUEST.set('resp_numx',resp_num)" dtml-if "resp_numx ''" dtml-let resp_ct=sequence-item resp_y=sequence-index dtml-if "resp_y == counter" dtml-in get_prs dtml-call "REQUEST.set('pr_num', strip_blank(pr_id)[:-1])" dtml-if "pr_num == selection" dtml-call "REQUEST.set('z_subject', pr_subject)" dtml-call "REQUEST.set('z_title',title)" dtml-call "REQUEST.set('msg',pr_content)" dtml-if "primary_email '' and primary_name ''" dtml-sendmail mailhost="MailHost" To: dtml-var primary_name dtml-var primary_email From: [EMAIL PROTECTED] Subject: dtml-var z_subject dtml-var z_title dtml-in "clean_content(msg)" dtml-var sequence-item /dtml-in /dtml-sendmail dtml-elif "primary_name == ''" dtml-sendmail mailhost="MailHost" To: dtml-var primary_email From: [EMAIL PROTECTED] Subject: dtml-var z_subject dtml-var z_title dtml-in "clean_content(msg)" dtml-var sequence-item /dtml-in /dtml-sendmail /dtml-if /dtml-if /dtml-in /dtml-if /dtml-let /dtml-if /dtml-let /dtml-in dtml-var standard_html_footer ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a problem with 'start' command
Gaby, If you are in the Zope directory, since most uni(x)es don't have the current directory in the path, you need to start zope with './start'. hth Phil - Original Message - From: "Gabriela Arevalo" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 2:57 PM Subject: [Zope] a problem with 'start' command hi all, I am a starter with Zope and i have a simple question. I need to execute 'start' command to start the server again. when i tried to do it, it gives me the message: command not found I looked at the directory, i can find the start command, and the permissions are -rwx--x--x. Can somebody help me with this ? Thanks Gaby ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: Acquisitive
Steve wrote: I'm guessing the the problem is that dtml-xxx; does an implicit "html_quote" format on whatever expression you provide.. so table dtml-set_table_0; should produce: table border=quot;0quot; cellpadding=quot;0quot; cellspacing=quot;0quot; Which the browser doesn't grok try: table dtml-var set_table_0 That works! It turned out that this was also complicated by some flakey behavior displaying nested tables, in MS IE. It seems that sometimes it doesn't matter what you specifiy for a table's properties, the parent tables properties take precedence. Thanks! Jerry S. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] GET requests in Medusa web server
Why does the Medusa server in Zope not handle GET requests which specify a full URI? For example, if I have a web server running on web.mydomain.com, and I want to get a file called "file.html", doing a GET request of the form GET http://web.mydomain.com/file.html HTTP/1.1 gives me a 404. Doing a GET of the form GET /file.html HTTP/1.1 works fine. If I understand RFC 2068 correctly, a HTTP 1.1 compliant server is expected to handle both cases (5.1.12 of RFC 2068) ... Hi Sean - What version of Zope are you seeing this with? I seem to remember fixing something along these lines fairly recently. Is it still the case in Zope 2.2.2? Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] argument type of list for ZSQL ?
Is it possible to create a ZSQL Method which has a list-type as an argument? ..something that might support a call like this (or similar): dtml-call expr="populate_department(dept_id=200, dept_member_ids=[22,150,89])" where inside the ZSQL Method I might iterate over dept_members dtml-in dept_members INSERT DepartmentMembers ( department_id, employee_id ) VALUES ( dtml-sqlvar dept_id type=int, dtml-var sequence-item ) dtml-var sql_delimiter /dtml-in If this can be written as shown (or similar) what would be the syntax used to populate the 'dept_members' field on the TEST view of the ZSQL Method? Would it just be: dept_member_ids: --- | [22,150,89] | --- or dept_member_ids: --- | "[22,150,89]" | --- or ... ? Brián Withun ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a problem with 'start' command
Phil, thanks for your suggestion, i understood it If you are in the Zope directory, since most uni(x)es don't have the current directory in the path, you need to start zope with './start'. but now when i execute the command i have the following message: - Traceback (innermost last): File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/z2.py", line 537, in ? zdaemon.run(sys.argv, os.path.join(CLIENT_HOME, Zpid)) File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/lib/python/zdaemon.py", line 204, in run pf.close() IOError: [Errno 49] Disc quota exceeded aurora:~/zope/Zope-2.2.2-solaris-2.6-sparc.24 % -- 2000-10-23T15:18:55 PROBLEM(100) ZServer Computing default hostname -- 2000-10-23T15:18:55 INFO(0) ZServer Medusa (V1.16.4.3) started at Mon Oct 23 17:18:55 2000 Hostname: aurora Port:8080 -- 2000-10-23T15:18:55 INFO(0) ZServer FTP server started at Mon Oct 23 17:18:55 2000 Authorizer:None Hostname: aurora Port: 8021 -- 2000-10-23T15:18:55 ERROR(200) ZServer Cannot write PID file. -- 2000-10-23T15:18:55 INFO(0) ZServer PCGI Server started at Mon Oct 23 17:18:55 2000 Unix socket: /home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/var/pcgi.soc -- 2000-10-23T15:18:55 INFO(0) ZServer Monitor Server (V1.8.4.1) started on port 8099 Traceback (innermost last): File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/z2.py", line 715, in ? pf.close() IOError: [Errno 49] Disc quota exceeded -- what does this message mean ? what can i do ? in fact, my problem is when i tried to execute "localhost":8080/pecos/ where i have the information i need, there seems to have problems, because the connection is not possible. first thing i thought is just to try to start the server again, but i can not. thanks for any help have a nice evening. Gaby ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", it makes my skin crawl. :-) Amen. That and "...to adminstrate a server". :^)= Bill -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Updating auto incrementing counter in a propertysheet
[..] When I try to get the property directly via the browser i get a result of "1" The default value for lastID=0 to begin with so this sounds plausible, but when I refresh the browser nothing happens. So I guess that lastID isn't updated in the above code. I think this is a class - object problem. Each time you create an object based on your ZClass, the lastID becomes 0. Each object has its own lastID, rather than what you are expecting which is one instance of last id. My advice... download and install FSCounter from Zope.org (http://www.zope.org/Members/andym/FSCounter) Add an FSCounter, call it "Unique" and turn Cookie? to OFF (very important). This will generate and keep track of an incrementing value on the file system Then in your constructor add / change: dtml-let u=Unique dtml-call "REQUEST.set('unique', u)" /dtml-let dtml-with "mxm_comment.createInObjectManager(_.str(REQUEST['unique']), REQUEST)" That should work like a charm. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) Here is the solution I found to do the .htaccess feature (I haven't found where it is written) : I put in my standard_html_header dtml-if expr="AUTHENTICATED_USER.getUserName()=='Anonymous User'" dtml-raise Unauthorized Il faut un compte pour voir ces pages. /dtml-raise /dtml-if and I add a new type of user with no rights in the acl_user folder. Hence each person with want to see the site should have an account, at least a no right account. Olivier. ps: the french sentence is useless since it never appears. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Lost External Methods
I am running Zope 2.1.4 (binary release, python 1.5.2, win32-x86) Python version: 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)] System Platform: win32 I have several external methods. Just recently, they started to be good for one run only. The external methods run fine once. The next run, they error out with: "Could not execute external method: ExtMthdName" If I reload that method [Edit button it] it runs fine again for one run. Any suggestions? And... while I'm at it, is there a way in Zope to programmatically reload [Edit button] an external method (in case I can't get the problem to go away and just out of general curiosity)? Robert J. Roberts LMSI-SDI 509.376.6343 [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
You could also do (and I would recommend it) by using the security system Zope give you. For example if you go to your root zope folder, click on security and deselect View for Anonymous User, this will have the same effect. - Original Message - From: "Olivier Ricou" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 9:01 AM Subject: Re: [Zope] newbie questions ? On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) Here is the solution I found to do the .htaccess feature (I haven't found where it is written) : I put in my standard_html_header dtml-if expr="AUTHENTICATED_USER.getUserName()=='Anonymous User'" dtml-raise Unauthorized Il faut un compte pour voir ces pages. /dtml-raise /dtml-if and I add a new type of user with no rights in the acl_user folder. Hence each person with want to see the site should have an account, at least a no right account. Olivier. ps: the french sentence is useless since it never appears. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] overriding manage methods
In my Z-Class I would like to hook various standard methods in a dtmlish way. The frame work would call my dtml method say manage_delObjects and within that method I would like to call the original manage_delObjects. I guess this must be a very standard requirement as I see that there are methods called afterAdd and beforeDelete etc in the object manager. I just don't know the proper namespace magic to override and eventually call these. -- Robin Becker ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] A ZClass for LaTeX documents
Hi, I've been using a ZClass for LaTeX documents that I put together in a manner very similar to the one described in making a ZClass for STX documents at http://www.zope.org/Members/tseaver/STX_Document I like to mark things up in LaTeX as I can type it faster than HTML, I can create very nice printouts in PDF or PostScript and there is a nice renderer into HTML called tth. There are a few annoyances that I would like some help on. * I am using tth (http://hutchinson.belmont.ma.us/tth/) which can convert LaTeX into HTML quite well. In order to do so, when uploading the tex file or changing the tex file, I call tth and store the HTML along with the tex source. My DTML for this is dtml-if uploaded_body dtml-call "REQUEST.set('body_tex', uploaded_body )" /dtml-if dtml-if body_tex dtml-let body_html="PARENTS[-1].SiteMethods.tth(body_tex)" dtml-call "REQUEST.set('body_html',body_html)" /dtml-let /dtml-if dtml-call "propertysheets.Basic.manage_editProperties( REQUEST )" dtml-call reindex_object Which if there is a new file upload stores it in body_tex, and then takes body tex and run tth on this to create the body_html. When I do this though, the tth is called on the old body_tex data, not the recently stored one. Because of this, I have to change the file twice. Any ideas as to why and how I can fix this? My guess is subtransactions, but I don't know how to fix that. * Ideally, I would like to be able to call the latex file this way dtml-var latex_filename fmt=tth (or even better just as dtml-var latex_filename) where tth is a method which takes a latex document and returns HTML. I couldn't figure out how to do this though. How does one go about defining new format methods for ZClasses? I would imagine it isn't hard, I just need to know where to look. * If that isn't too hard, I would also like to know how to make this an option for markup in SquishDot. I have a math class using this as a discussion board, and it would be nice to let them use basic LaTeX for math markup. Thanks for any pointers. John Verzani -- . John Verzani mailto:[EMAIL PROTECTED] . . Dept. of Mathematics http://www.math.csi.cuny.edu/~verzani . . City University of New York tel: (718) 982-3623 . . College of Staten Islandfax: (718) 982-3631 . . Staten Island, NY 10314 . ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How: /foo?var=bar equiv to /foo/bar
Heymann William wrote: I am trying to get rid of those question marks in my urls since it seems to confuse the users but I am not sure really how to do that. I have heard that it can but done but so far I have not found out how it can be done. I want for the last piece of the url to be assigned to the varialbe if a valid object can not by found. I don't really have a problem if this involves python coding I just need a place to start. You're looking for the DirArg product: http://www.zope.org/Members/itsafire/releases/DirArg Found in http://www.zope.org/Products/Helpers -- -mindlace- Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] A ZClass for LaTeX documents
From: John Verzani * Ideally, I would like to be able to call the latex file this way dtml-var latex_filename fmt=tth (or even better just as dtml-var latex_filename) Why not then just make an external method that can be called like: dtml-var "latex('filename')" That isn't to ugly. Max M. W. Rasmussen,Denmark. New Media Director private: [EMAIL PROTECTED] work: [EMAIL PROTECTED] - Specialization is for insects. - Robert A. Heinlein ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Looking for short term Zope contractor
Hi, I'm looking for someone to work on a short (2-3 weeks long) Zope project. The details of the project are fairly straightforward; we have a relatively small database of information that is currently being injected into MySQL, and we'll need this database to be viewable/searchable from the web. The job is in San Francisco, and, while physical proximity is not absolutely necessary, preference will be given to those who are local. Interested parties should email a resume (text only, no attachments, please) to me at [EMAIL PROTECTED] Thanks for your time and attention, and we now return you to your regularly scheduled [EMAIL PROTECTED] mailing list traffic. -rob -- +--+ Rob Miller Director of Systems Engineering International Space Sciences Organization [EMAIL PROTECTED] +--+ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a problem with 'start' command
Gaby, I'd say you need to get your disk quota extended. If your not the sysadmin then you need to speak to the relevant person about it. hth Phil [EMAIL PROTECTED] - Original Message - From: "Gabriela Arevalo" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 4:23 PM Subject: Re: [Zope] a problem with 'start' command | Phil, | | thanks for your suggestion, i understood it | | If you are in the Zope directory, since most uni(x)es don't have the current | directory in the path, you need to start zope with './start'. | | but now when i execute the command i have the following message: | | -- --- | | Traceback (innermost last): | File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/z2.py", line 537, in | ? | zdaemon.run(sys.argv, os.path.join(CLIENT_HOME, Zpid)) | File | "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/lib/python/zdaemon.py", | line 204, in run | pf.close() | IOError: [Errno 49] Disc quota exceeded | aurora:~/zope/Zope-2.2.2-solaris-2.6-sparc.24 % -- | 2000-10-23T15:18:55 PROBLEM(100) ZServer Computing default hostname | -- | 2000-10-23T15:18:55 INFO(0) ZServer Medusa (V1.16.4.3) started at Mon Oct | 23 17:18:55 2000 | Hostname: aurora | Port:8080 | | -- | 2000-10-23T15:18:55 INFO(0) ZServer FTP server started at Mon Oct 23 | 17:18:55 2000 | Authorizer:None | Hostname: aurora | Port: 8021 | -- | 2000-10-23T15:18:55 ERROR(200) ZServer Cannot write PID file. | -- | 2000-10-23T15:18:55 INFO(0) ZServer PCGI Server started at Mon Oct 23 | 17:18:55 2000 | Unix socket: | /home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/var/pcgi.soc | -- | 2000-10-23T15:18:55 INFO(0) ZServer Monitor Server (V1.8.4.1) started on | port 8099 | Traceback (innermost last): | File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/z2.py", line 715, in | ? | pf.close() | IOError: [Errno 49] Disc quota exceeded | | -- | | what does this message mean ? what can i do ? | | in fact, my problem is when i tried to execute | "localhost":8080/pecos/ where i have the information i need, there seems | to have problems, because the connection is not possible. | first thing i thought is just to try to start the server again, but i can | not. | | thanks for any help | | have a nice evening. | | Gaby | | | ___ | Zope maillist - [EMAIL PROTECTED] | http://lists.zope.org/mailman/listinfo/zope | ** No cross posts or HTML encoding! ** | (Related lists - | http://lists.zope.org/mailman/listinfo/zope-announce | http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] (no subject)
Robert Joseph Roos wrote: invalid attribute name, "manage_addproperty(name", for tag dtml-call manage_addProperty(name='foo', value='bar', type='string'), on line 10 of makeSched don't know if anybody helped you on this already, but any method call is an expression, and should be (pedantically) spelled: dtml-call expr="manage_addProperty(name='foo',value='bar', type='string')" hope that helps, -- -mindlace- Zopatista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Help Debugging External Methods
the Python debugger "pdb" It's a Python module used to debug Python programs. It can set breakpoints, single step and print expressions. It is activated automatically, when you start "ZPublisher/Test.py" with the "-D" option. Usually, I do not use it this way, however, as it takes too long, before I reach the interesting point. Instead, I use: import pdb; pdb.set_trace() at the point in Python code, where I want to get control. Then I use "Test.py" without "-D". Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Lost External Methods
On Mon, 23 Oct 2000 [EMAIL PROTECTED] wrote: And... while I'm at it, is there a way in Zope to programmatically reload [Edit button] an external method (in case I can't get the problem to go away and just out of general curiosity)? dtml-call "YourExtMethod.manage_edit(title='foo', module='bar', function='spam')" This code must have permission to do it, of course. (proxy roles) [EMAIL PROTECTED] /--\ | `long long long' is too long for GCC | \--/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie question
Hello and thanks for your patience!I am beginning to learn zope. I am going through the tutorials in the book. I have run into a problem creating an external method.I know I must be doing something stupid!I have my addEntry.py saved in the Extension folder in the Zope folder as it installed it (i'm in win 2k). I have the dtml method to call addEntry.When I try to add an external method id/function name/file name are all addEntry. (Supposedly to keep me from messing up...). I get this error message- Zope has encountered an error while publishing this resource. Error Type: SyntaxError Error Value: invalid syntax Troubleshooting SuggestionsThe URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. There must be a simple solution. I have looked at the o'reilly book/on-line docs/how tos and I am still not seeing my error. Please feel free to e-mail me directly at [EMAIL PROTECTED].I thought I had found a work around by installing python method but I am not sure what I need to put in the parameter list. Any help would be greatly appreciated!=Kathy Hesterto feel powerful oftento act powerful sometimesto overpower others seldomto share power whenever possible- unknown
[Zope] Cookie problem with IE5, 5.5, ...
I developped a toggle button to let the users hide/show the menus. I use a cookie to store the current value. The code I use is: dtml-if "State=='ON'" dtml-call "RESPONSE.setCookie('affmenu', '1')" dtml-else dtml-call "RESPONSE.setCookie('affmenu', '0')" /dtml-if /head dtml-call "RESPONSE.redirect(Retour)" in a dtml method. It works great in netscape, but not in IE 4, 5 or 5.5. Why??? I know I could use a session product, but I'm worried about session expiration. Could I set one of these products to expirate ***only*** when the browser is closed? And, why a session variable doesn't exist? It's the ONLY thing I miss from ASP... Jean-François Ménard Intranet DPAS Pratiques d'affaires et orientations *(514) 840-3000 poste 3939 * (514) 840-5585 * [EMAIL PROTECTED] * 855 Ste-Catherine est, 6e étage Montréal, Qué. H2L 4P5 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] AW: [Zope] a problem with 'start' command
Hi Gaby, I am not on of the zope-gods on this list, but there is something in the message that you sent that makes me stop and think: IOError: [Errno 49] Disc quota exceeded I believe the problem is not zope itself, but the amout of diskspace that you or the user 'pecos' is allowed to use in the dir /home/pecos/... Why this? Something, I presume it's the "quota daemon" of the "solaris-machin" that you are working on, tells your zope, that the 'Disc quota exceeded'. So what to do about that? 1. get rid of files you don't need anymore -- try to start zope 2. ask your sysadmin to give you more diskspace. this can be a hard one ;-) -- try to start zope I'm sure that after you've solved this problem, you are going to run into 'zope-problems' ;-) Try to go for the Zope Book online http://www.zope.org/Members/michel/ZB/. gruezi ;-) p@ -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Gabriela Arevalo Gesendet: Montag, 23. Oktober 2000 17:23 An: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Betreff: Re: [Zope] a problem with 'start' command Phil, thanks for your suggestion, i understood it If you are in the Zope directory, since most uni(x)es don't have the current directory in the path, you need to start zope with './start'. but now when i execute the command i have the following message: -- --- Traceback (innermost last): File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/z2.py", line 537, in ? zdaemon.run(sys.argv, os.path.join(CLIENT_HOME, Zpid)) File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/lib/python/zdaemon.py", line 204, in run pf.close() IOError: [Errno 49] Disc quota exceeded aurora:~/zope/Zope-2.2.2-solaris-2.6-sparc.24 % -- 2000-10-23T15:18:55 PROBLEM(100) ZServer Computing default hostname -- 2000-10-23T15:18:55 INFO(0) ZServer Medusa (V1.16.4.3) started at Mon Oct 23 17:18:55 2000 Hostname: aurora Port:8080 -- 2000-10-23T15:18:55 INFO(0) ZServer FTP server started at Mon Oct 23 17:18:55 2000 Authorizer:None Hostname: aurora Port: 8021 -- 2000-10-23T15:18:55 ERROR(200) ZServer Cannot write PID file. -- 2000-10-23T15:18:55 INFO(0) ZServer PCGI Server started at Mon Oct 23 17:18:55 2000 Unix socket: /home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/var/pcgi.soc -- 2000-10-23T15:18:55 INFO(0) ZServer Monitor Server (V1.8.4.1) started on port 8099 Traceback (innermost last): File "/home/pecos/zope/Zope-2.2.2-solaris-2.6-sparc/z2.py", line 715, in ? pf.close() IOError: [Errno 49] Disc quota exceeded -- what does this message mean ? what can i do ? in fact, my problem is when i tried to execute "localhost":8080/pecos/ where i have the information i need, there seems to have problems, because the connection is not possible. first thing i thought is just to try to start the server again, but i can not. thanks for any help have a nice evening. Gaby ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Looking for short term Zope contractor
Hello, i'm an experienced zope/acs developer in Pasadena,CA. my resume to follow. Cheers Kapil Kapil Thangavelu Contact Information: [EMAIL PROTECTED] [EMAIL PROTECTED] http://lostworld.imeme.net http://sindev.dhs.org 2445 E. Del Mar Apartment 238 Pasadena, CA 91107 (626) 405-9877 (home) Objective: To obtain a challenging position in which I can use my experience in creating community based web applications. Desired Job: Full-Time Employee Preferred Site Location: Pasadena, CA Education: College of William Mary BS in Computer Science History Graduated May 2000 Professional Skills: Areas of Expertise: - very skilled in Python, C, HTML, JavaScript - very skilled in Zope, Open Source Web Application Server and Oracle/ACS4/Aolserver - skilled in Java, Perl, C++, XML, TCL/TK - well-versed in underlying Internet Protocols: HTTP(S), TCP/IP, DNS/BIND, DHCP, SMTP, IMAP, POP Areas of Proficiency: - Strong Knowledge of Linux Kernel, multi-threaded programming, process management - RDBMS Design and SQL (PostGresSQL, ORACLE) - Skilled in Systems Adminstration - Redhat, Mandrake, Suse - Knowledgable of different Web Application Platforms: Enhydra, Servlets, Apache, AOLServer/ACS, Midguard Work Experience: OpenSource Developer - July - August 2000 Developing OpenSource Zope/Python Products. Product releases include a Mailman (www.list.org) search/archive, and a NewsSyndication Product based on RSS/OCS. BootCamp - ArsDigita.com - June - July 2000 Participated in the ArsDigita bootcamp. Acquired skills in Aolserver, Oracle, Tcl scripting and the ACS community system. Web Application Developer - ASTi February 2000 - May 2000 Hired by ASTi, member of the Python Consortium, to implement a prototype of their corporate intranet, designed to manage project workflow and production. Technologies used Zope/XML/Python/SQL. I talked with ASTi employees regarding site requirements and project management. I designed and implemented a working prototype to fufill those requirements and the workflow guidelines I was given. After the prototype was build, I turned over the project to their web master, and educated him regardings its construction and extensibility. Some of the things that I designed and implemented and integrated with the corporate intranet. * RDBMS schema for ASTi's parts and production components as well as installation and setup of RDBMS (PostgreSQL) * A validating xml-parser/dom interface for ASTi's internal project parts. The Product created subvendor orders based on a customer's product spec/purchase order. * A searchable email archive for communications between ASTi's sales engineer and clients. * A flexible user system, to allow for automatic messaging for various phases of workflow and presentation of intranet menus based on user roles. Director of Development - Information Technology @ College of William Mary Fall 1999 - May 2000 www.sin.wm.edu Selected to be the architect of the next generation Student Information Network at the College, an information portal for students. I investigated various Web Application Platforms, before settling on Zope, Python , and PostgreSQL, to replace an aging code-base of mod_perl scripts. Taught the developers about Zope Architecture and Python and lead them in designing and implementing a new functionality and reimplementation. Designed and Implemented Session Management(cookie-less), IMAP authentication, Team Web Site for Distrvuted Development, Online Rideboard, Message Board, Housing Market, Local Jobs. Choice of tools, technology, and design/implementation focused on easy maintenance, rapid development, and extensibility. Skills Acquired - Management of the Software Life Cycle - Object Oriented esign - Team Managment Field Consultant - Technology Support Center @ College of William mary Summer 1999 - Spring 2000 Assisted in training of on-call support specialist. Made field visits to various problem sites doing network troubleshooting (DHCP, SMB, TCP/IP), operating systems troubleshooting (Linux, WIN98), and application troubleshooting (Email Clients, MS Office). HTML -PERL/CGI Developer - Information Technology @ College of William Mary Spring 1998- Spring 1999 Designed and Implemented Entertainment Section
Re: [Zope] Looking for short term Zope contractor
Doh!, i've gotten far to use to hitting reply all on my emails:) kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] New to list Zope
Hi, I run debian 2.2 and have Zope installed and apache. On bootup my Zope server starts automatic. I am wondering how I configure Zope with an Apache server? I am very very new to Zope so really want a little help in starting off. My network works fine by the way and I use cabke modem with a static IP for my website. Thanks for any help. Right now I only see Zope in my cgi-bin and thought I should have a file zope.cgi? As you can see I am a little lost :-) Eileen Orbell Software Internet Applications Capitol College mailto:[EMAIL PROTECTED] Don't Fear the Penguin. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New to list Zope
On Tue, 24 Oct 2000, Eileen Orbell wrote: Hi, Greetings, and welcome, new Zopista! I run debian 2.2 and have Zope installed and apache. On bootup my Zope server starts automatic. Always handy. (o8 I am wondering how I configure Zope with an Apache server? I am very very new to Zope so really want a little help in starting off. My network works fine by the way and I use cabke modem with a static IP for my website. Thanks for any help. Right now I only see Zope in my cgi-bin and thought I should have a file zope.cgi? As you can see I am a little lost :-) The way we run it at work is to use ProxyPass in Apache. Check your Apache docs, or even easier is to search for ProxyPass on the Zope web site ( www.zope.com ) Eileen Orbell Software Internet Applications Capitol College mailto:[EMAIL PROTECTED] Don't Fear the Penguin. Have a better one, Curtis Maloney Developer Cardgate.Net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
Olivier Ricou wrote: On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) I guess since I took 3 years of it, I am barred from guessing? ;^) -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Updating auto incrementing counter in a propertysheet
Max Møller Rasmussen wrote: What am I doing wrong here ... please !! I am trying to make an autoincrementing counter for use in a diskussion forum. It's purpose is to autogenereate id's for new messages. It is important that the id's are in order, so I need to make them this way. Is it more important that they be in an order, or that they be in a specific sequential list? For example, an id based upon time stamp would indeed provide IDs that re orderable (thus handling the in order part). While a list od IDs named 1,2,3,4... is more like a 'linked list', where you know what follows and what precedes a given id. However, by using objectIds, you can obtian a list of ids in a given object (folder), and thus provide one for yourself, if needed. FTR, I have implemented both ways of doing it. I am leaning towards the timestamp as being more effective, simpler. -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] New to list Zope
Greetings! Great to have yet another Zope follower; hopefully you will decide to stick with it... Just be patient, you will find out that after a solid month of using Zope that is has never ending power (thanks to python and the awesome coders at digital creations). You can use ProxyPass (mod_proxy) or Rewrite (mod_rewrite) to communicate with Zope from Apache. This basically creates a "tunnel" between Apache and Zope, and data gets exchanged between the two. Some people find that ProxyPass doesn't work for them, so Rewrite is great as well (I personally use Rewrite because it suits my site). Confer with www.zope.org, or come to #zope on irc.zope.net with an irc client. Regards, Knight On Tue, 24 Oct 2000, Curtis Maloney wrote: On Tue, 24 Oct 2000, Eileen Orbell wrote: Hi, Greetings, and welcome, new Zopista! I run debian 2.2 and have Zope installed and apache. On bootup my Zope server starts automatic. Always handy. (o8 I am wondering how I configure Zope with an Apache server? I am very very new to Zope so really want a little help in starting off. My network works fine by the way and I use cabke modem with a static IP for my website. Thanks for any help. Right now I only see Zope in my cgi-bin and thought I should have a file zope.cgi? As you can see I am a little lost :-) The way we run it at work is to use ProxyPass in Apache. Check your Apache docs, or even easier is to search for ProxyPass on the Zope web site ( www.zope.com ) Eileen Orbell Software Internet Applications Capitol College mailto:[EMAIL PROTECTED] Don't Fear the Penguin. Have a better one, Curtis Maloney Developer Cardgate.Net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
Heh. authentification hah. http://www.phunc.com/Humor/Signs/ChineseRestraunt Check that out... same kind of humor. Grin. Knight On Mon, 23 Oct 2000, Bill Anderson wrote: Olivier Ricou wrote: On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) I guess since I took 3 years of it, I am barred from guessing? ;^) -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
That's pretty funny, but what's actually funnier is you mispelling "restaurant" in your URL. :-) - Original Message - From: "knight" [EMAIL PROTECTED] To: "Bill Anderson" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 10:18 PM Subject: Re: [Zope] newbie questions ? Heh. authentification hah. http://www.phunc.com/Humor/Signs/ChineseRestraunt Check that out... same kind of humor. Grin. Knight On Mon, 23 Oct 2000, Bill Anderson wrote: Olivier Ricou wrote: On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) I guess since I took 3 years of it, I am barred from guessing? ;^) -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
Uh oh, you got me ;] Probably related to the cold medicine. grin. On Mon, 23 Oct 2000, Chris McDonough wrote: That's pretty funny, but what's actually funnier is you mispelling "restaurant" in your URL. :-) - Original Message - From: "knight" [EMAIL PROTECTED] To: "Bill Anderson" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 10:18 PM Subject: Re: [Zope] newbie questions ? Heh. authentification hah. http://www.phunc.com/Humor/Signs/ChineseRestraunt Check that out... same kind of humor. Grin. Knight On Mon, 23 Oct 2000, Bill Anderson wrote: Olivier Ricou wrote: On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) I guess since I took 3 years of it, I am barred from guessing? ;^) -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie questions ?
http://www.phunc.com/Humor/Signs/ChineseRestaurant There. ;] On Mon, 23 Oct 2000, Chris McDonough wrote: That's pretty funny, but what's actually funnier is you mispelling "restaurant" in your URL. :-) - Original Message - From: "knight" [EMAIL PROTECTED] To: "Bill Anderson" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 10:18 PM Subject: Re: [Zope] newbie questions ? Heh. authentification hah. http://www.phunc.com/Humor/Signs/ChineseRestraunt Check that out... same kind of humor. Grin. Knight On Mon, 23 Oct 2000, Bill Anderson wrote: Olivier Ricou wrote: On Mon, Oct 23, 2000 at 06:43:06AM -0400, Chris McDonough wrote: And by the way, it's "authentication". Every time I see "authentification", guess how we say in french :) I guess since I took 3 years of it, I am barred from guessing? ;^) -- E PLURIBUS LINUX ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] One last request
I have one unsolved mystery left. What I am trying to do is print the titles from the DTML Documents in the 'artikelen' folder (and actually another property called 'inleiding'. I believe the code below should do this, but it does not work. It returns 'Zope' instead of the title. If I use the 'inleiding' property it reports that it does not exist. If I just use sequence-item it returns the complete item ok. Any clues ? Thanks, Taco http://www.gezondheidskrant.nl:8080/mainframe : dtml-let articleList="[]" dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf dtml-call "articleList.append(_['sequence-item'])" /dtml-in dtml-in "articleList[-4:]" reverse dtml-let theDocument=sequence-item dtml-var "theDocument.title" dtml-var "theDocument.inleiding" /dtml-let /dtml-in /dtml-let ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] One last request
Taco Scargo wrote: I have one unsolved mystery left. What I am trying to do is print the titles from the DTML Documents in the 'artikelen' folder (and actually another property called 'inleiding'. I believe the code below should do this, but it does not work. It returns 'Zope' instead of the title. If I use the 'inleiding' property it reports that it does not exist. If I just use sequence-item it returns the complete item ok. Any clues ? Thanks, Taco http://www.gezondheidskrant.nl:8080/mainframe : dtml-let articleList="[]" dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf dtml-call "articleList.append(_['sequence-item'])" /dtml-in dtml-in "articleList[-4:]" reverse dtml-let theDocument=sequence-item dtml-var "theDocument.title" dtml-var "theDocument.inleiding" /dtml-let /dtml-in /dtml-let try this instead dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf size=4 reverse dtml-var title dtml-var inleiding /dtml-in kapil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Updating auto incrementing counter in a propertysheet
On Mon, 23 Oct 2000, Max Mller Rasmussen wrote: I have a zClass (objectmanger) with a property called "lastID", on a propertysheet called "hidden". I have then written a dtml mehtod that should return the id incremented by 1 and then sets the lastID to this new id. the dtml for the "newID()" dtml method looks like this: -- dtml-call "REQUEST.set('new_id', lastID+1)" dtml-call "REQUEST.set(lastID, new_id)" In the above line --- do you want to set up new value for ZClass property, isn't it ? If so, you have to use manage_changeProperties method of property sheet. [EMAIL PROTECTED] /--\ | `long long long' is too long for GCC | \--/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] One last request
I have one unsolved mystery left. What I am trying to do is print the titles from the DTML Documents in the 'artikelen' folder (and actually another property called 'inleiding'. I believe the code below should do this, but it does not work. It returns 'Zope' instead of the title. If I use the 'inleiding' property it reports that it does not exist. If I just use sequence-item it returns the complete item ok. Any clues ? Thanks, Taco http://www.gezondheidskrant.nl:8080/mainframe : dtml-let articleList="[]" dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf dtml-call "articleList.append(_['sequence-item'])" /dtml-in dtml-in "articleList[-4:]" reverse dtml-let theDocument=sequence-item dtml-var "theDocument.title" dtml-var "theDocument.inleiding" /dtml-let /dtml-in /dtml-let instead, try this: dtml-in "artikelen.objectValues(['DTML Document'])" sort=publiceren_vanaf dtml-comment THIS actually 'calls' sequence-item dtml-call "articleList.append(_['sequence-item'])" /dtml-comment dtml-call "articleList.append(_.getitem('sequence-item',0))" /dtml-in dtml-in "articleList[-4:]" reverse dtml-let theDocument="_.getitem('sequence-item',0)" dtml-var "theDocument.title" dtml-var "theDocument.inleiding" /dtml-let /dtml-in Mark ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Adding many instances at once
Hallo, how can you add many ZClass-instances at once. I mean with the correct content,title and other properties.The example(adding zclass to a zclass)is always adding one class.The next problem is how to deal with the properties in a form if you don't know how many items are added by the user?? User A is adding three news-items at once, the next is adding 5. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] The Great Python (and Perl) Method Renaming Poll
We will be conducting a community poll to decide what to call Python (Perl, insert your language here) Methods. Many candidates have been discussed, but I'm afraid I don't have enough time to cull all the candidates from the discussions. So, before the poll, we are calling for nominiations from the community. Please send me an email containing one or more candidate names. These names will be added to the list. No pre-screening will be done, so please exercise some discretion if your favorite name is more tounge-in-cheek than practical (you never know what the masses will decide though!). Later this week, I will create a web poll where you can vote for your favorite. thanks, -Michel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )