[Zope-dev] Re: Comments on ZPatterns
At 03:10 PM 6/28/00 +0100, Chris Withers wrote: 1. Too much jargon... by far... Lots of complicated words that are meanlingless to the layman and don't help to convey the concepts. Yep, like "Acquisition" and "object publishing". :) Seriously, that is very much the level we're talking about here. ZPatterns is an evolution to Zope's revolution, in the area of web-based application development models. Zope says the answer is publishing objects in an environment supporting acquisition. The ZPatterns design approach is an attempt to answer to the question, "So what objects should I publish, and what are the appropriate uses of acquisition?" As with Zope itself, it is both a design approach *and* an implementation toolkit for the approach, which certainly doesn't help the confusion. :) Also, as in the early days of Zope, terminology evolves and changes as the developers of the concepts seek better ways to explain them to other people. As an example, "Specialist" was originally called "Interface" by Ty and I back around September or so. It evolved to "Implementation Provider" in the later part of the year, and "Implementor" by the time of our conference presentation. After using that name on the lists a while, and in developing the ZPatterns code, it became clear that the name still really sucked and we needed one that made more sense on initially encountering it. After considerable brainstorming, the term "Specialist" was born, and on the whole we're happy with it. Other terms are still in flux, and many I hope we can do away with by replacing them with simpler, more powerful ideas (such as replacing all of the different Trigger and Provider plugins with a simple declarative scripting syntax that lets you specify the aspect weaving for your objects). 2. Feature runaway. It seems every day something new (and more confusing) has been added to ZPatterns. I think ZPatterns will only work if it is kept as simple and functional as possible. My view (bearing in mind my limited understanding ;-) would be to concentrate on Containers, Container Groups and Plugins on the one front and Racks, Specialists and the various providers and agents on the other. Been there, done that, actually. There really hasn't been much change in ZPatterns from 0.3 to 0.4 in that regard. Most of the upheaval has been due to making it possible for the capabilities of "Rackmountables" to be used in non-rack settings. This forced some significant generalization of the model and some extension to the "theory" in the area of the internal event model (which was previously incomplete and too hardwired). Believe it or not, in 0.4 I have actually *removed* some previously existing data management plug-ins. The acquired attribute provider and acquired sheet provider classes were replaced with a generic "link to parent data plug-ins" class, for example. As Ty mentioned in his post on this subject, we will be trying to do away with other such features later, replacing them with general-purpose tools. Unfortunately, all this evolution makes ZPatterns a moving target for comprehension at the moment. In spite of this, my reading of the lists seems to indicate that there are a few people besides Ty and myself who are actually achieving results with the framework. I hope that they can help to provide more accessible how-to materials, because I'm still very focused on *finishing* ZPatterns to the level that my "paying job" requires. And it's likely going to be a few months before my "paying job" requires that I have introductory docs available for the tools (although I'd personally really like to have some available before then). ___ 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] More comments on ZPatterns
At 10:06 AM 7/3/00 -0500, Steve Spicklemire wrote: Seriously, I'm trying to get it all figured out, and I thought maybe if I attempted to do something 'real' with it I would at least learn what I *don't* understand. Well.. I've learned a *lot*! (about what I don't understand.. ) ;-) The source code is astonishingly simple looking, but about one layer deeper that I can easily grok, apparently. That's an unfortunate side-effect of applying Demeter's law... it's easy to grasp (in an abstract way) local implementation aspects, but hard to grasp how the actual *concrete* implementation works from looking at the pieces. It's the "there's no *there* there" effect, as Ty dubbed it. I also create a "TableInfo" ZClass, subclass of DataSkin, that quantifies the kind of data the customers have to choose from, and metadata about the data (headers, query parameters and suchlike). I create a ZClass property sheet for the TableInfo ZClass. Finally I create an instance of Specialist (tableManager) with a (default) rack of TableInfo objects. Now... some of the Tableinfo properties, and some of the View properties are *really* in MySQL. I figured out, from the mail list and the source code, that I can create a Generic attribute provider in the rack that can get attributes from an SQL database for my DataSkin descendents using the 'source expression' and 'target expression' business. Congratulations, you found the top secret documentation. :) Source expression: (GetTableInfo(tableInfoID=self.id) or [NOT_FOUND])[0] Target expressions: tableHeaders=RESULT.tableHeaders footnote=RESULT.footnote and when I ask one of my TableInfo instances for their footnote it comes right out of MySQL! Cool. Now.. I can't seem to figure out how to *change* the data in the database when the user 'edits' the DataSkin which brings up the whole issue of changing stuff in DataSkins. Here's some more top-secret documentation... Use a GenericTrigger to implement attribute changes. Set up your trigger to be activated on object changes, and set the trigger expression to call an SQL method, e.g.: UpdateTableInfo(object=self,CHANGED=CHANGED) In the SQL method, code something like this: UPDATE mytable SET dtml-if "CHANGED('attr1')" attr1=dtml-var "object.attr1", /dtml-if ... WHERE primary_key='dtml-var "object.id" sql_quote' with an "if" block for each attribute you might want to update. Last part, and this is the trick that's not yet documented... set the "Set Attrs" field to be a list of the attributes you want the trigger to handle set/delete operations for. (You don't need to put anything in the "Keeping" field unless you need a "before" value of an expression to use in your SQL.) ___ 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] ZPatterns: DropZone example
At 05:26 PM 6/28/00 +0100, Steve Alexander wrote: The suggested specialists in the Accounting framework are: Invoices Orders Customers Products What I'm finding is that these are just the White-box specialists. A clean design would seem to want all the specialists above, plus at least one Black-box specialist to do the "heavy lifting. Let's call it the "AccountingProcessor" specialist. Keep in mind that a Specialist doesn't just "store" a bunch of objects, it also provides *methods for dealing with sets of objects*. So an Invoices specialist could usefully contain a wide variety of reporting methods, for example. Similarly, the Customers specialist might have a method to post balances forward on all customer accounts whose statement cycle is in a certain date range. These are all "heavy lifting" from an accounting point of view, but perfectly valid to have in the white-box specialists. White-box doesn't mean that there's no implementation; it just means that the implementation is intended to be extensible or integratable by someone other than the framework's original developer. Now, if I had a third-party accounts package (something by Sage perhaps), I could make the AccountingProcessor specialist expose various functions to the four other White-box specialists. It would implement these by making equivalent calls on the underlying accounting package. I could also swap the heavy-lifting portion of my framework by swapping the black-box AccountingProcessor specialist for one that talks to some software by Quicken, or perhaps some software that is written in Python as a conventional Zope product. That's all quite true, but it would probably be simplest to do such a thing using AttributeProviders and SheetProviders in the white-box specialists. It does seem reasonable to have those providers talk to an AccountingProcessor object if you want to make your framework talk to different back-ends, but I think it is misleading and incorrect to call AccountingProcessor a specialist, as it's not an application-level service object, but a private implementation helper. Interestingly, you've just given me what may be a motivating example for using Shane Hathaway's DatabaseAPI in conjunction with ZPatterns, assuming of course that I've correctly understood his most recent explanation of the DatabaseAPI product. The same goes for the Resource Scheduling framework. We have some White-box specialists, ripe for customisation: Resources Reservations ResourceUsers And then for the heavy-lifting we have the black-box ResourceScheduler specialist. Again, this might be a Zope Python Product, or it might be an interface to some application written on top of Microsoft Exchange. Again, look to what these specialist would do besides look up objects. For example, utilization or load-balancing reports. Generating bills for usage. Generating calendars for individual resources. Checking for conflicts. Etc. Are specialists intended to be placed inside other specialists, as "contents"? You *can* do this, but I've not yet encountered a real-life situation where I *would* do this. (Mike has given some examples that suggest it might be useful under some circumstances, however.) So in this case, would the white-box specialists live inside the black-box specialist -- so they become the customisable aspects of the overall framework? Or would both black-box and white-box specialists live inside an uber-specialist? If anything, the black box should be inside the white. Otherwise, you are creating confusion between heaven and earth. :) Seriously, the white boxes are the parts you will reference in URL's most often, so why have /AccountingProcessor/Invoices/ when you can just have /Invoices/? If you have to share a black box among white boxes, acquire it. If your "root" gets too messy, then make an "Accounting" folder and put Invoices, AccountingProcessor, and the rest inside of it. ___ 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] ZPatterns Specialist Question
At 11:54 AM 7/3/00 +0100, Chris Withers wrote: Just a quickie: If, as the the ZPatterns Wiki states, 'Specialists are not classes', then why is there a 'Specialist' python class in the ZPatterns distribution? Specialists are instances of the class "Specialist". They are not themselves classes. The reason for emphasizing that point is that it is a common misconception of people beginning to use the ZPatterns design approach - they conflate or confuse specialists with the class of the things which they intend to use the specialist to gain access to. In other words, they assume that a specialist called "Customers" would always manipulate "Customer" instances, when in fact it might manipulate "SkyDiver" instances. Most of the point of having a specialist is to have a binding point which allows you to decouple your intended use of a thing, from the specific implementation of it. If one misses this point, one will be blind to a wide variety of ZPatterns' useful applications, and at the same time likely to ask why both Racks and Specialists are needed. They are both needed because the Specialist deals with a particular problem-domain aspect of a thing, and the Rack deals with implementation aspects. ___ 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] bug in zpatterns-0.4 ?
"Phillip J. Eby" wrote: Nope. The two levels of methods (get/retrieve and new/create) are there to seperate Rack-level concerns from implementation concerns. getItem() and newItem() handle maintenance of Rack-level invariants such as the retrieval cache, while retrieveItem() and createItem() deal with object-level invariants. If you called retrieveItem() instead of getItem(), the code would bypass the rack-level invariants managed by getItem(), which would mean in this case that the per-transaction cache would be bypassed. yes, this is a bit more clear to me now. Hm. Seems to me that you should just use two GAP's, one for each DB table, each using "self.id[0]" and "self.id[1]" respectively to determine their primary keys. (cough) why didn't I think about it??? Also, my racks are specialized to have a searchResults method, and a editItem method (until I can find the time to write a decent SQL Attribute setter provider) A reasonable approach. Although, in the case of SQL attribute setting, see my other e-mail from this evening about the use of Generic Triggers to do SQL attribute setting. btw, the genericattributeprovider has saved me a great deal of time. thanks very much! No problem. Did you ever try re-casting your CatalogAwareness replacement to use GenericTrigger instead of a specific Agent plug-in? I did not have the time to do so. I still stick to Zope-2.1.6 for now, and I was afraid of the issues with transaction commit order. and the motto is 'if it ain't break, don't fix it'. I have a contract to upgrade the product in august though. I will look at it at that time. regards, [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 )
[Zope-dev] site versions with zope
Hello, I'd like to modify a live site, instead of working on a mirror copy. Could someone explain me, step by step, how sessions work? Thanks Nathalie Bernier * Développeur web multiThématiques Centre Jean Monet Longlaville 54400 LONGWY http://multithematiques.com Chaînes thématiques sur câble et satellite * ___ 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] Help needed: why is this DTML not working in zope 2 ?
You could try moving stuff to the new dtml style for starters: dtml-var standard_html_header and the like. That might help, if not let us know.. cheers, Chris Gilles Lavaux wrote: Hello, I am a little bit disappointed not getting any echo from my previous question, so I report it. Maybe my dtml is wrong for zope2, but I would appreciate to have some explanation from more experienced peoples. If I can not find a solution, we will have to keep our zope1 production server, and it will be the end of the Zope story in my company :-( So my question was : I want to display the content of a site starting from a folder called 'Site' with a tree tag. I want also to render immediately inside the tree the documents with an ID=='PUBLIC_Doc'. In Zope 1.x I have a working dtml method like this: !--#var standard_html_header-- !--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized-- b!--#var id--/b !--#if "_['id']=='PUBLIC_Doc'"-- ## !--#try-- !--#var "_[_['id']]"-- !--#except-- !--#var Except_Message-- !--#/try-- ## !--#/if-- !--#/tree-- !--#var standard_html_footer-- Unfortunatly for me , with zope 2.1.6 i get an error when I try to render the 'PUBLIC_Doc' document: . PUBLIC_Doc !# Error type:AttributeError Error Message: Error Message:__call__ Error TB:Traceback (innermost last): File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in render_try_except result = render_blocks(self.section, md) File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in eval return eval(code,globals,d) File "", line 0, in ? File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in careful_getitem v=mapping[key] File "/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__ r=apply(HTML.__call__, (self, client, REQUEST), kw) File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502, in __call__ try: return render_blocks(self._v_blocks, md) AttributeError: __call__ has someone a solution ?? Thanks, Gilles ___ 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] Help needed: why is this DTML not working in zope 2 ?
Hello Lee !--#var PUBLIC_Doc-- doesn't change anything, same error. (you are right, I can use the name directly , but I have some other piece of code where I have to use the _[_['']] construction, so it has to work...) But I found something: In my 'PUBLIC_Doc' document I display image with a !--# var image_name-- tag, my problem disappear if I use !--#var "image_name"--, someone can explain this?? Thanks anyway for the replies Gilles -Original Message- From: LEE, Kwan Soo [EMAIL PROTECTED] To: Gilles Lavaux [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, July 04, 2000 12:32 PM Subject: Re: [Zope-dev] Help needed: why is this DTML not working in zope 2 ? Not an answer, but a question. b!--#var id--/b !--#if "_['id']=='PUBLIC_Doc'"-- ## !--#try-- !--#var "_[_['id']]"-- !--#except-- You seems to "call" PUBLIC_Doc, then why don't you just !--#var PUBLIC_Doc-- instead of the !--#var "_[_['id']]"--? LEE Kwan Soo ___ 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] Help needed: why is this DTML not working in zope 2 ?
Gilles Lavaux wrote: But I found something: In my 'PUBLIC_Doc' document I display image with a !--# var image_name-- tag, my problem disappear if I use !--#var "image_name"--, someone can explain this?? Are you sure the space after the # isn't your problem? I would STRONGLY recommend moving your code to the new syntax, especially if you are having problems. You should be aware that plans are afoot to remove the old syntax... 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 )
[Zope-dev] Fwd: [Zope-PTK] Area based roles?
Original Message On 7/4/00, 12:45:29 PM, Monty Taylor [EMAIL PROTECTED] wrote regarding [Zope-PTK] Area based roles?: Hi all. I've got an idea of something I'm trying to implement, and I'm wondering if the concept is of use to anyone else. I've got an Intranet up in PTK. (What a shock, as I'm posting here. :) ) I'm slowly getting people to use it for internal collaboration, et al. But the main things people are wanting to do are internal to their own department, with some overlap. So you've got: +PTKRoot | +-Members | +-John | +-Sue | +-Marketing +-Technology Say John is in Technology and Sue is in Marketing. What I want is for John to have Contributor rights in the context of Technology, and Sue in Marketing, i.e. John adds a News Item and Publishes it. It shows up in Technology but not Marketing. I thought about creating a Technolgy Item ("Release Notes") and a Marketing one ("Press Release") and then just having a catalog search on the meta-type of each in the appropriate folder's index_html and give them all Contributor. But that strikes me as unclean. It would be nice to have anyone be able to create a Press Release or Release Notes, but only have them published in their department's context, and merely pending in others. Am I making any sense at all? Does anyone see either a need for doing this or a way to do it? If it requires changes to PTK core, would anyone be interested in those, or should I throw them in my pile of dirty little secrets that no one should really know exist? Thanks, Monty ___ Zope-PTK maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-ptk See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests ___ 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] Help needed: why is this DTML not working in zope 2 ?
Argh!!! no, I made a typo error : it was !--#var image_name--.the syntax was good. Ok, I will use the new syntax in my new sites. But for my old site, I will not modify my ~500 dtml methods, except if there is a way to automate the change. Gilles -Original Message- From: Chris Withers [EMAIL PROTECTED] To: Gilles Lavaux [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, July 04, 2000 1:33 PM Subject: Re: [Zope-dev] Help needed: why is this DTML not working in zope 2 ? Gilles Lavaux wrote: But I found something: In my 'PUBLIC_Doc' document I display image with a !--# var image_name-- tag, my problem disappear if I use !--#var "image_name"--, someone can explain this?? Are you sure the space after the # isn't your problem? I would STRONGLY recommend moving your code to the new syntax, especially if you are having problems. You should be aware that plans are afoot to remove the old syntax... 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 ) ___ 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] Re: [Zope-PTK] Roles, Groups, Security and Group Membership
Original Message On 7/4/00, 1:22:04 PM, Chris Withers [EMAIL PROTECTED] wrote regarding [Zope-PTK] Roles, Groups, Security and Group Membership: Monty Taylor wrote: Am I making any sense at all? Does anyone see either a need for doing this or a way to do it? If it requires changes to PTK core, would anyone be interested in those, or should I throw them in my pile of dirty little secrets that no one should really know exist? You're making perfect sense and I think it's a Zope problem partly, and also a PTK problem. Good point. I think as ZEO becomes more prevelant and Zope wants to compete in the realm of big systems, group based interaction could serve to iron some things out. The Zope problem is that Zope security has no idea about Groups. As in Users/Members exist There may have roles They may also be members of Groups. Groups may also be members of Groups. Groups may also have roles associated with THEM. Other major security systems I can think of (LDAP, Unix, NT, Notes) all have this concept but Zope does not :( Should this part of the discussion be moved to zope-dev? Probably so. I've forwarded the original email there and I'm sending this one to zope-dev. Any comments from the zope-dev world? Monty ___ 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] ZEO Replication/Cache
I just installed an instance of ZEO Storage Server with a client on the same machine and a client on a different machine. So far, it seems to work reasonably well, with one exception. None of the changes I've made on one client seem to propagate to the other client unless I restart the other client. This can't be the intended modus operendi. Have I missed something obvious, or is the proactive notification from server to client not implemented yet? Monty ___ 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] Re: [Zope] site versions with zope
At 10:38 4-7-00 +0200, Nathalie Bernier wrote: Hello, I'd like to modify a live site, instead of working on a mirror copy. Could someone explain me, step by step, how sessions work? Hi, At http://www.zope.org/Documentation/Guides/ZCMG (Zope Content Manager's Guide) you'll find a section called 'Working with versions'. May be this is what you are looking for. Diny. DIVA Faculty of Veterinary Medicine The Netherlands http://www.vet.uu.nl ___ 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] ZCatalog lexicon bug is back?
Chris Withers writes: I seem to remember Michel being a little less than happy when he saw that code. Quite frankly, I still don't have much confidence in (Z)Catalog (still no docs for all the cool stuff, dodgy bugs and few responses when they're raised...) which is a shame since it's Zope full text searching mechanism... Chris PS: If that doesn't get a response, I give up ;-) I am very interested in ZCatalog. I promiss that I will look into it, when I come to 2.2. Currently, we are building a Zope 2.1.6 production site. So, I still stay focused with 2.1.6. My contributions to ZCatalog probably will not be ready for 2.2 final, but, if necessary, I will provide patches later. Dieter ___ 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] Help needed: why is this DTML not working in zope 2 ?
Steve Alexander wrote: Gilles Lavaux wrote: Argh!!! no, I made a typo error : it was !--#var image_name--.the syntax was good. Ok, I will use the new syntax in my new sites. But for my old site, I will not modify my ~500 dtml methods, except if there is a way to automate the change. You can write a pretty simple external method to walk your Zope object heirarchy looking for DTML Methods and DTML documents, then altering the syntax. Shouldn't take more than an hour to write and debug and test and document, if you've written stuff in Python before. I'm off to a meeting for a few hours, but harrass me later and I'll send to the list a proof-of-concept external method to get you started. An external method for automated change from old syntax to new syntax follows. * Use at your own risk * No warranty implied or given * Use on a copy of your main Zope site * Back up data.fs three times before starting * Not guarenteed not to spin your processor and never terminate * Run on a copy of Zope in debug mode (-D) to see the print statements * Barely tested, if at all import re def convert_dtml(self): """Convert DTML Methods and DTML Documents from old syntax to new syntax. Warning: recursive! Might just eat all your stack. Does not work on subclasses of DTML Method and DTML Document. Preserves normal comments, and handles instances of "--" in quotes. """ print 'convert_dtml: id=%s' % self.title_and_id() if hasattr(self, 'meta_type') and \ (self.meta_type == 'DTML Method' or \ self.meta_type == 'DTML Document'): convert(self) # should this be "isPrincipiaFolderish"? if hasattr(self, 'isAnObjectManager') and self.isAnObjectManager: for v in self.objectValues(): v.convert_dtml() _convert_regex = re.compile('!--#(/?)(([^"-]+?|"[^"]*?"|-[^-])+?)--') def convert(dtml_item): print 'converting...' title = dtml_item.title # like document_src, but doesn't require RESPONSE data = dtml_item.PrincipiaSearchSource() print 'data' print data newdata = _convert_regex.sub('\g1dtml-\g2', data) print 'newdata' print newdata print 'end' dtml_item.manage_edit(newdata, title) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] Help needed: why is this DTML not working in zope 2 ?
Steve Alexander wrote: An external method for automated change from old syntax to new syntax follows. * Use at your own risk * No warranty implied or given * Use on a copy of your main Zope site * Back up data.fs three times before starting * Not guarenteed not to spin your processor and never terminate * Run on a copy of Zope in debug mode (-D) to see the print statements * Barely tested, if at all _convert_regex = re.compile('!--#(/?)(([^"-]+?|"[^"]*?"|-[^-])+?)--') Actually, I missed something in the original regex, above. (Funny how I noticed just after I pressed the 'send' button!) It should read like this: _convert_regex = re.compile('''!--#(/?)(([^"-]+?|"[^"]*?"|'[^']*?'|-[^-])+?)--''') The whole thing again -- same disclaimers apply, only more so :-) import re def convert_dtml(self): """Convert DTML Methods and DTML Documents from old syntax to new syntax. Warning: recursive! This assumes that DTML Method and DTML Document haven't been subclassed. """ print 'convert_dtml: id=%s' % self.title_and_id() if hasattr(self, 'meta_type') and \ (self.meta_type == 'DTML Method' or \ self.meta_type == 'DTML Document'): convert(self) # should this be "isPrincipiaFolderish"? if hasattr(self, 'isAnObjectManager') and self.isAnObjectManager: for v in self.objectValues(): v.convert_dtml() _convert_regex = re.compile('''!--#(/?)(([^"-]+?|"[^"]*?"|'[^']*?'|-[^-])+?)--''') def convert(dtml_item): print 'converting...' title = dtml_item.title # like document_src, but doesn't require RESPONSE data = dtml_item.PrincipiaSearchSource() print 'data' print data newdata = _convert_regex.sub('\g1dtml-\g2', data) print 'newdata' print newdata print 'end' dtml_item.manage_edit(newdata, title) -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] ZCatalog lexicon bug is back?
Dieter Maurer wrote: I am very interested in ZCatalog. I promiss that I will look into it, when I come to 2.2. Thanks, Documentation of the cool stuff which is already there, and making it work 100% reliably are the two main things... 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] ZPatterns: DropZone example
Thus spake Phillip J. Eby ([EMAIL PROTECTED]): That's all quite true, but it would probably be simplest to do such a thing using AttributeProviders and SheetProviders in the white-box specialists. It does seem reasonable to have those providers talk to an AccountingProcessor object if you want to make your framework talk to different back-ends, but I think it is misleading and incorrect to call AccountingProcessor a specialist, as it's not an application-level service object, but a private implementation helper. Does anybody out there have even the slightest clue about how to go about using AttributeProviders and SheetProviders? A select few terse hints on this subject would really help us (me) figure it out enough to start working on some howto's. Interestingly, you've just given me what may be a motivating example for using Shane Hathaway's DatabaseAPI in conjunction with ZPatterns, assuming of course that I've correctly understood his most recent explanation of the DatabaseAPI product. Am i wrong in thinking that DatabaseAPI is a completely separate solution to the same problem that ZPatters is suppose to address? Personally i have to give DatabaseAPI props for being quite easy to understand and use, while not sacrificing power. sRp -- Scott Parish http://srparish.net/ PGP signature
Re: [Zope-dev] ZPatterns: DropZone example
At 02:21 AM 7/5/00 +, Scott Parish wrote: Does anybody out there have even the slightest clue about how to go about using AttributeProviders and SheetProviders? A select few terse hints on this subject would really help us (me) figure it out enough to start working on some howto's. You might look at some of the recent posts which included an example of using GenericAttributeProviders to read from a MySQL database, and my reply explaining how to use a GenericTrigger to update that same database. Am i wrong in thinking that DatabaseAPI is a completely separate solution to the same problem that ZPatters is suppose to address? Personally i have to give DatabaseAPI props for being quite easy to understand and use, while not sacrificing power. Peter Coad's design approach (which ZPatterns is heavily based on/biased towards) emphasizes four major layers of classes in an application: 1) User Interface (GUI, forms, etc.) 2) Problem Domain (the actual application purpose) 3) Data Management (object persistence/lifecycle management) 4) System Interaction (interfaces w/hardware or other software) ZPatterns is focused on providing tools for transparent mappings between layers 2 and 3, while DatabaseAPI, as far as I can see (and I actually did play around with it today to get a feel for it), is focused on tools for building clean mappings between layers 3 and 4. In my mind, this makes them complementary tools, rather than competitors in any real sense. Indeed, looking at DatabaseAPI has shown me that there are some features I'd planned for ZPatterns (or already started) that I can scrap because DatabaseAPI has them and can easily interoperate. (Personally, I'd like to see a version of DatabaseAPI using PlugIns to structure its user interface, which I think could easily make it even cleaner and easier to use than it already is. It might then also be possible to reuse some of its plug-ins for functionality in areas of ZPatterns. But I digress.) So where do DatabaseAPI and ZPatterns overlap? DatabaseConnector has some functional overlap with Specialist. If you ignore the attribute, sheet, and trigger providing aspects of ZPatterns (and also look only at the raw functionality), the primary difference between a Specialist and a DatabaseConnector is that DatabaseConnectors will probably have methods to delete objects or change their data, which is a no-no for a Specialist because it's an encapsulation breach. Beyond this, there's a significant difference in intent between a Specialist and a DatabaseConnector (IMHO). A Specialist serves as a broker to access objects which fill a certain role in a framework, while a DatabaseConnector represents an object which manipulates "records" which are of "record types" and have "fields". Specialists use Racks to explicitly distinguish between problem-domain and data-domain concerns; you can probably do this with nested DatabaseConnectors but you'll have to do some additional work to support it. ZPatterns could definitely benefit from some ideas found in DatabaseAPI, primarily in the aspect of documenting API's and supporting better design contracts. For example, it would be nice for a Specialist to be able to define the API expected from its Racks, and a for an application framework to somehow define the API expected from the Specialists it will interact with. One could of course use the existing DatabaseAPI product to do these things, but the integration would be less than smooth, since you'd have to make the Specialist ask the Racks for their DatabaseConnectors, or else have a Rack class that delegated to a DatabaseConnector, or something like that. Anyway, I'm going to have to give these possibilities some more thought. ___ 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] MySQL transaction support (was: MySQL Select Statements)
Original Message On 7/4/00, 12:47:07 AM, Andy Dustman [EMAIL PROTECTED] wrote regarding Re: [Zope] MySQL transaction support (was: MySQL Select Statements): Note also: With non-transactional databases, you would expect to get better performance by having several open connections which are not shared. In the case of MySQL, each connection has it's own server thread, and this can exploit CPUs, if available. However, connections should not be shared on transactional databases, because transactions are tied to a connection, and not a cursor. Even if there is a mutex to keep multiple threads from executing queries simultaneously on the same connection, the transactions are going to be whacky. Oracle is obviously transactional. Does anyone know how it handles connection pooling? I'll look and see it I can figure it out, but I'd love it if someone already knew... Monty ___ 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] Authentication, Anonymous and Public
On Fri, 30 Jun 2000, Dieter Maurer wrote: Capesius, Alan writes: I'm running into a problem after implementing jcNTUserFolder in a subfolder of my site. Users can access the root level or particular subfolders anonymously. Once a user accesses the protected NTUserFolder, the credentials are saved in the browser. If the user then returns to the anonymous area, they can no longer access th folder due to the browser credentials. Does Zope have a mechanism equivalent to the Novell NDS Public access? that is to say: Anonymous = not authenticated. Everyone = authenticated users (that are members of the group) Public = authenticated and anonymous users. In Zope, each user has a set of roles. Any user has the "Anonymous" role. Log-in users may have additional roles. Thus, what you see, should not happen. Users, by default, are not granted the 'Anonymous' role. If you explicity grant the Anonymous role to your users you will get the behaviour you want. Earlier than current versions of GUF automatically did this, but I changed it in the later releases after I saw the error pointed our by Ty or Phillip - this may be a source of some confusion. This email live from drizzly Queensland :-( -- Stuart Bishop Work: [EMAIL PROTECTED] Senior Systems Alchemist Play: [EMAIL PROTECTED] Computer Science, RMIT University ___ 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] NOTICE: issue with database packing in current Zopereleases
On Thu, 29 Jun 2000, Brian Lloyd wrote: Jim found a problem with the algorithm for packing the Zope database that we wanted to announce so that folks can avoid being bitten by it until the fix is out (in b4). I think this is a candidate for a Hotfix. 2.2 upgrades could be problematic and I think we might continue to see large numbers of 2.1.6 users until all the products run happily on it. -- Stuart Bishop Work: [EMAIL PROTECTED] Senior Systems Alchemist Play: [EMAIL PROTECTED] Computer Science, RMIT University ___ 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] uploading from client PC in MySQL thru ZSQL
Hello, I'm trying to "import" a CSV text file for feeding a MySQL database. I have : * DTML method including : form method="post" action="import" enctype="multipart/form- data" input type="file" name="loadFileAnnu" input type="submit" value="Import File in MySQL" /form * ZSQL method 'import' parameter : loadFileAnnu query template : LOAD DATA LOCAL INFILE 'dtml-var loadFileAnnu' INTO TABLE annuaire FIELDS TERMINATED BY ';' when i process the form, i always get the import/manage_testForm and if i try to upload the (local on my PC) file thru this, i get an MySQL error Error, _mysql.InterfaceError: (0, "File 'D:/AnnuaireTest.csv' not found (Errcode: 2)") SQL used: LOAD DATA LOCAL INFILE 'D:/Data/SIT67/AnnuaireTest.csv' INTO TABLE annuaire FIELDS TERMINATED BY ';' Am i doing something wrong or is it impossible to load/import in MySQL from the local file (so i should upload the file on the server then load into MySQL) ?? Thanks in advance for any tip or info. -- Didier Georgieff DDAF du Bas-Rhin - Cellule SIG 2, rue des Mineurs 67070 Strasbourg Cedex tél : 03.88.25.20.33 - fax : 03.88.25.20.01 email : [EMAIL PROTECTED] GéoWeb http://10.67.90.3 (Intranet Agriculture) GéoWeb http://sertit10.u-strasbg.fr (Internet) ___ 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] site versions with zope
Hello, I'd like to modify a live site, instead of working on a mirror copy. Could someone explain me, step by step, how sessions work? Thanks Nathalie Bernier * Développeur web multiThématiques Centre Jean Monet Longlaville 54400 LONGWY http://multithematiques.com Chaînes thématiques sur câble et satellite * ___ 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] Help needed: why is this DTML not working in zope 2 ?
Hello, I am a little bit disappointed not getting any echo from my previous question, so I report it. Maybe my dtml is wrong for zope2, but I would appreciate to have some explanation from more experienced peoples. If I can not find a solution, we will have to keep our zope1 production server, and it will be the end of the Zope story in my company :-( So my question was : I want to display the content of a site starting from a folder called 'Site' with a tree tag. I want also to render immediately inside the tree the documents with an ID=='PUBLIC_Doc'. In Zope 1.x I have a working dtml method like this: !--#var standard_html_header-- !--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized-- b!--#var id--/b !--#if "_['id']=='PUBLIC_Doc'"-- ## !--#try-- !--#var "_[_['id']]"-- !--#except-- !--#var Except_Message-- !--#/try-- ## !--#/if-- !--#/tree-- !--#var standard_html_footer-- Unfortunatly for me , with zope 2.1.6 i get an error when I try to render the 'PUBLIC_Doc' document: . PUBLIC_Doc !# Error type:AttributeError Error Message: Error Message:__call__ Error TB:Traceback (innermost last): File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in render_try_except result = render_blocks(self.section, md) File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in eval return eval(code,globals,d) File "", line 0, in ? File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in careful_getitem v=mapping[key] File "/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__ r=apply(HTML.__call__, (self, client, REQUEST), kw) File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502, in __call__ try: return render_blocks(self._v_blocks, md) AttributeError: __call__ has someone a solution ?? Thanks, Gilles ___ 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] uploading from client PC in MySQL thru ZSQL
+[ Didier Georgieff ]- | | SQL used: | LOAD DATA LOCAL INFILE 'D:/Data/SIT67/AnnuaireTest.csv' | INTO TABLE annuaire FIELDS TERMINATED BY ';' Local means local to the actual mysql client (your webserver), not local to your user (browser). You could get your form to upload the file to a LocalFS directory and then use that path the INFILE. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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] About Powered by Zope...very simple, isn't it?
+[ Pierre Rougier ]- | Hi zopatistas, | well... this is not a very important thing, but I would like to remove | the picture "Powered by Zope" at the end of my Zope Pages... | is it possible..? I though it was in the "standard html header" but it | seems that it is not...gasp... | someone can help me? | It's in standard_html_footer, you were pretty close. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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] About Powered by Zope...very simple, isn't it?
On Tue, 4 Jul 2000, Pierre Rougier wrote: well... this is not a very important thing, but I would like to remove the picture "Powered by Zope" at the end of my Zope Pages... is it possible..? I though it was in the "standard html header" but it footer Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ 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] About Powered by Zope...very simple, isn't it?
On Tue, 4 Jul 2000, Pierre Rougier wrote: is it possible..? I though it was in the "standard html header" but it seems that it is not...gasp... Yeah it's in the standard html footer! :-) best wishes, Nils ___ 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] About Powered by Zope...very simple, isn't it?
Hi, well... this is not a very important thing, but I would like to remove the picture "Powered by Zope" at the end of my Zope Pages... is it possible..? I though it was in the "standard html header" but it seems that it is not...gasp... it is in standard_html_footer ... Robert ___ 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] problem with ZopeFind and objectValues
I can now answer in part: On Mon, 3 Jul 2000, Jerome Alet wrote: dtml-in "ZopeFind(this(), obj_metatypes=['Folder'])" dtml-var id - dtml-var title /dtml-in gives me the following error: """Unauthorized You are not authorized to access id.""" If I set a proxy role of manager to this dtml-method that doesn't change anything, it still doesn't work. In fact if I give this method a proxy role of Manager then it works fine if I access directly to this method from my browser. However if I call this method from inside another dtml method then it seems that the method loose its proxy role of manager. e.g.: say mymethod has a proxy role of manager and a method called anothermethod contains somewhere: dtml-var mymethod then if anothermethod has no proxy role at all: browsing: http://myserver/myfolder/mymethod works fine. browsing: http://myserver/myfolder/anothermethod doesn't work (Unauthorized). I have to give the proxy role of Manager to anothermethod too if I want both to work correctly. Is it a feature or a bug ? thanks in advance. Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] Powered By Zope logo
Dear Zpeople The "Powered by Zope" logo in the footer is slow to load for some reason, and I don't like the colour of it (nice, but not one the site I'm working on at the moment. Basically, where do I find the source for this: !--#var ZopeAttributionButton-- Yes, I know that I can create my own, but why bother when one already exist. Yours truly, Peter
[Zope] generate a list of date
Hello, I want generate and show a list of days in a period. For instance: (period from 2000-06-07 to 2000-06-30) 2000-06-07, 2000-06-08, 2000-06-08 ... 2000-06-30 How can I do this??? -- By Frank ___ 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] Restarting with NT
If I stop Zope as a service from NT's Service Manager or from the Zope management interface it seems to kick and scream while restarting. In the application log I see repeated errors stating the service could not start. These repeat until the application log is full. Zope appears to be running, but I have not yet learned how long it is cycling to start. The error series is essentially, "Starting Zope Service" , "Could not Start Zope Service" until the log is full. From there I'm not sure. Is this a known issue or am I missing a switch setting for start-up? This does not occur from reboot. Everything is as normal as I know normalcy. Thanks ___ 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] Powered By Zope logo
On Tue, Jul 04, 2000 at 12:44:14PM +0100, Peter Bengtsson wrote: The "Powered by Zope" logo in the footer is slow to load for some reason, and I don't like the colour of it (nice, but not one the site I'm working on at the moment. Basically, where do I find the source for this: !--#var ZopeAttributionButton-- The image is loaded from ib/python/App/www/zope_button.jpg -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio - ___ 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 needed: why is this DTML not working in zope 2 ?
Hello Gilles, I think you've been bitten by a recently solved bug in dtml-try. When 2.2.0b4 comes out, please download it and try it out with your DTML (or if you're in a hurry, download from CVS.) If 2.2.0b4 doesn't solve it, e-mail me right away. Shane Gilles Lavaux wrote: Hello, I am a little bit disappointed not getting any echo from my previous question, so I report it. Maybe my dtml is wrong for zope2, but I would appreciate to have some explanation from more experienced peoples. If I can not find a solution, we will have to keep our zope1 production server, and it will be the end of the Zope story in my company :-( So my question was : I want to display the content of a site starting from a folder called 'Site' with a tree tag. I want also to render immediately inside the tree the documents with an ID=='PUBLIC_Doc'. In Zope 1.x I have a working dtml method like this: !--#var standard_html_header-- !--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized-- b!--#var id--/b !--#if "_['id']=='PUBLIC_Doc'"-- ## !--#try-- !--#var "_[_['id']]"-- !--#except-- !--#var Except_Message-- !--#/try-- ## !--#/if-- !--#/tree-- !--#var standard_html_footer-- Unfortunatly for me , with zope 2.1.6 i get an error when I try to render the 'PUBLIC_Doc' document: . PUBLIC_Doc !# Error type:AttributeError Error Message: Error Message:__call__ Error TB:Traceback (innermost last): File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in render_try_except result = render_blocks(self.section, md) File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in eval return eval(code,globals,d) File "", line 0, in ? File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in careful_getitem v=mapping[key] File "/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__ r=apply(HTML.__call__, (self, client, REQUEST), kw) File "/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502, in __call__ try: return render_blocks(self._v_blocks, md) AttributeError: __call__ has someone a solution ?? Thanks, Gilles ___ 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] Lists and external methods
Hello there, I started working with Zope a few days ago, and I'm currently having some troubles with external methods. I made an external method that returns a record like list, but this doesn't seem to work correctly The list look a bit like this: 90, "x86", "Explanation", "22/06/200" 89, "x86", "Explanation", "22/06/200" 89, "mac", "Explanation", "22/06/200" I want the external method to return this in a list, where I can iterate over using the dtml-in tag, so that I can reference the different fields in each record with a name. What should the list look like so that I can accomplish this? Pieter ___ 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 needed: why is this DTML not working in zope 2 ?
Shane Hathaway wrote: I think you've been bitten by a recently solved bug in dtml-try. When 2.2.0b4 comes out, please download it and try it out with your DTML (or if you're in a hurry, download from CVS.) If 2.2.0b4 doesn't solve it, e-mail me right away. Oops, looks like you solved it. Well, don't try it with 2.2.0b3 cause it won't work. :-) Shane ___ 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] Lists and external methods
On Tue, 4 Jul 2000, Pieter Claerhout wrote: I want the external method to return this in a list, where I can iterate over using the dtml-in tag, so that I can reference the different fields in each record with a name. What should the list look like so that I can accomplish this? dtml-in eats a list of objects or a list of dictionaries. Example 1. class Item: pass Your external methods should return: l = [] item1 = Item() item1.date = "21/12/67" item1.foo = "bar" l.append(item1) item2 = Item() item2.date = "1/1/2000" item2.foo = "baz" l.append(item2) ...etc... return l In the DTML use the list: dtml-in thelistdtml-var date/dtml-in thelist Example 2 (dictionaries). Your external methods should return: l = [] item1 = {} item1["date"] = "21/12/67" item1["foo"] = "bar" l.append(item1) item2 = {} item2["date"] = "1/1/2000" item2["foo"] = "baz" l.append(item2) ...etc... return l In the DTML use the list: dtml-in thelist mappingdtml-var date/dtml-in thelist ^^^ dtml-in needs to be notified these are dicttionaries. Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ 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] Sorting a list descending using dtml-in
Hello, if I'm iterating over a list using the dtml-in tag, is it then possible to sort the items descending? Pieter Pieter Claerhout Application Support - CreoScitex Europe ___ 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] Sorting a list descending using dtml-in
Seems to work fine in Zope 2.1.6... Pieter -Original Message- From: Jerome Alet [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 04, 2000 3:48 PM To: Pieter Claerhout Cc: '[EMAIL PROTECTED]' Subject: Re: [Zope] Sorting a list descending using dtml-in On Tue, 4 Jul 2000, Pieter Claerhout wrote: if I'm iterating over a list using the dtml-in tag, is it then possible to sort the items descending? IIRC: !-- UNTESTED -- dtml-in mylist sort=id reverse /dtml-in bye, Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE ___ 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] cookies
Hello !!! can you tell me how can I use the "cookies" Thank you very much ___ 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] generate a list of date
How about: dtml-let today="ZopeTime()" dtml-in "_.range(10)" dtml-var "today + _['sequence-index']" fmt="%D" /dtml-in /dtml-let "F" == F Richter [EMAIL PROTECTED] writes: F Hello, I want generate and show a list of days in a period. F For instance: (period from 2000-06-07 to 2000-06-30) F 2000-06-07, 2000-06-08, 2000-06-08 ... 2000-06-30 F How can I do this??? -- By Frank F ___ Zope maillist - F [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No F cross posts or HTML encoding! ** (Related lists - F http://lists.zope.org/mailman/listinfo/zope-announce F 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] ZCatalog, subtransactions permissions
Hi All, I have a user that is trying to go thru the JobBoard tutorial. In part of the tutorial he is supposed to turn off subtransactions in his instance of ZCatalog. However, he does not have the necessary permissions to do so. I'm the one that is supposed to setup his permissions, but I can't seem to find how or where to do it. Which permission is it and where is it set? There is no security tab in the ZCatalog folder, so I can't change his local role for that folder. I've tried changing his local role in the folder that contains the ZCatalog folder, but without any luck. TIA, Eric. ___ 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] Programmierungshilfe
[Sorry for writing in German.] [EMAIL PROTECTED] (Bruno Nana) wrote: [Die deutschsprachige Mailing-Liste zu Zope kann man auf http://mailman.beehive.de/mailman/listinfo/zope abonnieren. Diese Liste, [EMAIL PROTECTED], ist üblicherweise englischsprachig.] Und alle diese Tabellen habe ich definiert und initialisiert, bei bestimmten Sachen werden die einige Tabelle gefunden, oder andere Tabellen gar nicht. In welchem DBMS, Name und Version sind hilfreich, wurden die Tabellen definiert? Wie wird auf sie zugegriffen? Wie ist die Rechtevergabe? Welches Betriebssystem? Auffällig ist doch schon einmal, daß die Probleme scheinbar nur auftreten, wenn versucht wird, Datensätze zu löschen. Bitte könnte jemanden mir helfen, diese Fehler aufzuheben? Vielleicht :-) Tip: Wenn man andere um Hilfe bitte, immer alle relevanten Informationen mitliefern. Wenn man im Zweifel ist, lieber zuviel Details geben als zuwenig. Cheers, Nils -- [EMAIL PROTECTED] | [EMAIL PROTECTED] (preferred) [EMAIL PROTECTED] | [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] too many open files
Help! Zope 2.1.6 refuses to work in the middle of an external method on my i386 running under OpenBSD 2.7. Is says: OSError [Errno 24] Too many open files: '[EMAIL PROTECTED]' I've never ever seen this problem before and this external method used to work well until some minutes ago. Now the error keeps reappearing even after rebooting and also other external methods that used to run well now deliver the same message. Does anybody have suggestions how to diagnose/cure this problem? --Ragnar ___ 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] too many open files
+[ Ragnar Beer ]- | Help! | | Zope 2.1.6 refuses to work in the middle of an external method on my | i386 running under OpenBSD 2.7. Is says: | | OSError | [Errno 24] Too many open files: '[EMAIL PROTECTED]' | | | I've never ever seen this problem before and this external method | used to work well until some minutes ago. Now the error keeps | reappearing even after rebooting and also other external methods that | used to run well now deliver the same message. | | Does anybody have suggestions how to diagnose/cure this problem? You have several options:- First type 'unlimit' at your prompt before you start Zope (or in a shell script). This should raise your max files from 64 to 800+ You should verfiy this by typing 'limits' at a prompt to see what the settings are before and after the unlimit. Next you can increase the MAXUSERS in your kernel conf to something larger (say over 100) which will increase the maximum number of file descriptors available and increase the number network buffers availalble (which you will need for a webserver anyway) -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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] site versions with zope
At 10:38 4-7-00 +0200, Nathalie Bernier wrote: Hello, I'd like to modify a live site, instead of working on a mirror copy. Could someone explain me, step by step, how sessions work? Hi, At http://www.zope.org/Documentation/Guides/ZCMG (Zope Content Manager's Guide) you'll find a section called 'Working with versions'. May be this is what you are looking for. Diny. DIVA Faculty of Veterinary Medicine The Netherlands http://www.vet.uu.nl ___ 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] too many open files
Recompile your kernel with a higher value for MAXUSERS (x4 for example) - Original Message - From: "Ragnar Beer" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 04, 2000 6:31 PM Subject: [Zope] too many open files Help! Zope 2.1.6 refuses to work in the middle of an external method on my i386 running under OpenBSD 2.7. Is says: OSError [Errno 24] Too many open files: '[EMAIL PROTECTED]' I've never ever seen this problem before and this external method used to work well until some minutes ago. Now the error keeps reappearing even after rebooting and also other external methods that used to run well now deliver the same message. Does anybody have suggestions how to diagnose/cure this problem? --Ragnar ___ 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] cgi-tasks howto? stupid question
hi, is there any document around which list procedures how to accomplish simple cgi tasks with dtml. say i get a input into a text box thru the browser with the name as valname. Then how do i print this valname thru dtml. ofcourse i checked out with the guides but could locate cgi calls, something called request i did find, but dont know how to use it. thankx ps: dont kick me out, everybody has to have a start. ___ 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] cgi-tasks howto? stupid question
[EMAIL PROTECTED] (Rajil Saraswat) wrote: browser with the name as valname. Then how do i print this valname thru dtml. This is easy. dtml-var valname See the rules for "Name Lookup" in the DTML Reference Guide. There are circumstances where it's not so simple... ofcourse i checked out with the guides but could locate cgi calls, That's so because the documentation sucks^H^H^H^H^Hneeds to be improved. Digital Creations is aware of this. ps: dont kick me out, everybody has to have a start. We are all gentle tolerant people here. Well, most of the time. Cheers, Nils -- [EMAIL PROTECTED] | [EMAIL PROTECTED] (preferred) [EMAIL PROTECTED] | [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] Re: Traversal of ZODB
On Fri, 30 Jun 2000, David Trudgett wrote: I wonder if anyone has a sample Python script that traverses the ZODB to query or perform arbitrary operations on the objects found in it? My present requirement is to write a script that goes through and does some automated updating of several dozen DTML documents. Hi David, I just posted something similar to Zope-Dev: http://lists.zope.org/pipermail/zope-dev/2000-July/005744.html -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.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] Authentication, Anonymous and Public
Dieter Maurer wrote: A user that does not log in, i.e. a user you know nothing of, gets the "Anonymous" role automatically (at least with "acl_users"). A logged in user may not get the "Anonymous" role. This does not provide additional security, because this user may simply shut down his browser and access the page again as anonymous user. On the other hand, it may result in surprises: suddenly (after a log on) I can no longer do things that I was able to do before the log on. I think, this should be changed. I agree, and I've said so, many times before ;-) Chris ___ 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] cookies
can you tell me how can I use the "cookies" try: dtml-call "RESPONSE.setCookie('blurk', 'nonsens')"/p dtml-if "REQUEST.cookies['blurk']" dtml-var "REQUEST.cookies['blurk']" dtml-else no blurk today /dtml-if Also see the relevant portion of the DTML reference guide http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.4.5.html#pgfId-10470 78 and the dtml-snippet http://zdp.zope.org/projects/zsnippet/snippets/ClientServerInteraction/SetCo okie Rik ___ 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] Re: Traversal of ZODB
At 2000-07-04 20:32 +0100, Steve Alexander [EMAIL PROTECTED] wrote: On Fri, 30 Jun 2000, David Trudgett wrote: I wonder if anyone has a sample Python script that traverses the ZODB to query or perform arbitrary operations on the objects found in it? My present requirement is to write a script that goes through and does some automated updating of several dozen DTML documents. Hi David, I just posted something similar to Zope-Dev: http://lists.zope.org/pipermail/zope-dev/2000-July/005744.html Thanks for that. I actually worked out a fairly similar hack myself, which only did one folder (which was OK for the particular task that I wanted it to do). Your recursive method has no doubt saved me quite a bit of time in generalising it. There are still a couple of little question marks in my mind, though. But before I get to them, I'll just post a sample of what I came up with (minus most of the gory details of the actual processing I wanted to do: def processDTML(self): """Process DTML documents within a folder.""" import re myregex = re.compile(r"(H1.*?/H1)") thisdoc = self.getFirstChild() while thisdoc is not None: if hasattr(thisdoc, 'meta_type'): if thisdoc.meta_type == 'DTML Document': # Do processing stuff here doctext = thisdoc.raw doctext = myregex.sub(r"\1\n\nH2Profile/H2\n", doctext) thisdoc.raw = doctext thisdoc = thisdoc.getNextSibling() return 'Complete!' Just for easy reference, this was what you came up with: import re def convert_dtml(self): """Convert DTML Methods and DTML Documents from old syntax to new syntax. Warning: recursive! This assumes that DTML Method and DTML Document haven't been subclassed. """ print 'convert_dtml: id=%s' % self.title_and_id() if hasattr(self, 'meta_type') and \ (self.meta_type == 'DTML Method' or \ self.meta_type == 'DTML Document'): convert(self) # should this be "isPrincipiaFolderish"? if hasattr(self, 'isAnObjectManager') and self.isAnObjectManager: for v in self.objectValues(): v.convert_dtml() _convert_regex = re.compile('''!--#(/?)(([^"-]+?|"[^"]*?"|'[^']*?'|-[^-])+?)--''') def convert(dtml_item): print 'converting...' title = dtml_item.title # like document_src, but doesn't require RESPONSE data = dtml_item.PrincipiaSearchSource() print 'data' print data newdata = _convert_regex.sub('\g1dtml-\g2', data) print 'newdata' print newdata print 'end' dtml_item.manage_edit(newdata, title) Some questions I have in my mind: 1. I used "raw" and you used "PrincipiaSearchSource()" . The reason I used raw was because I wanted to be sure that what I got wasn't munged in any way, and that what I put back reflects what was actually there before. 2. You used the "manage_edit()" method, whereas I just assigned to the "raw" property. My way seems to work OK, but I'm not sure how yours works: I assume it brings up an edit page in the browser for each document? 3. I don't like resorting to testing the "meta_type" for a particular string value. As you noted in your code, it doesn't allow for subclassing, so it's not fully general. 4. I was surprised that the import statement (not to mention "re.compile()") could be put outside of the method definition, considering that Zope's external methods grab on to individual methods within a Python module. David Trudgett ___ 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] RFC: is this the best way to make a referal app and a jump navmenu *2nd time*menu *2nd time*
Basically i would like people's opinions as to whether i built these things in the "right" way or not. tia! jump menu *created a selection list and told it to pass a variable (the url of the selected item) called "url" to a method called "jump" which consists of the following: dtml-call "RESPONSE.redirect(url)" its a little slow but it works :-) referral product (as in http://www.recommend-it.com/) i pass the variables on the first page (where people enter name, email, and up to 5 of their friends email addresses) to a method called success here's the problem i think: since i am enabling people to email up to 5 friends, i've got 5 copies of the same email message in the success method inside the sendmail tags. the last 4 are in if statements. i know there must be a better way but i really have no idea. any help? (btw if anybody wants to use these things just email me and ill send you the terribly simple yet useful code. :-) tia! Regards, G e o r g e D o n n e l l y [EMAIL PROTECTED] http://www.LetsJapan.com/ Share Your Experiences, Learn From Others' ! ___ 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] What is the best way to do this?
Hello zope-masters, I humbly ask your advice on several matters. I am making an internal website for a statewide student activist group with many members. It will hopefully feature discussion boards, a contact database, and a calendar of events. I want to make the users of the site part of the contact database, so that an entry in the database (a name, phone number, etc.) can be easily "promoted" into a user with a password and varying priveliges based on his/her role (volunteer, core member, board chair, etc.) Another feature I want to include is regional specialization - each contact/user, calendar event, and forum has an associated "region" - statewide or a specific campus or something in between. That way a user's default view of the statewide calendar won't be cluttered by irrelevant events, and a search through the contact database would by default only return results pertaining to the user's region. I've tried building some custom zClasses but when things start to get complex the dtml code gets really messy, so I think I should use external methods to do most of the work. Basically I'd appreciate any advice on how to put these ideas into code or pointers to relevant documentation. I don't mean to sound like "here's my very complicated plan, write the code for me", I just need some tips on how to get started. Thanks. -- Building highways to reduce traffic is like loosening your belt to reduce obesity. ___ 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] What is the best way to do this?
alex, IMHO when you try to do stuff using ZClasses and DTML and it starts looking too complex to you then it is. DTML is made for presentation, not for driving an application. a very sound architectural approach, and one that scales very well as your site and organzation grows, is a base of python-based zope products with ZClasses that derive from them. all the logic happens in the python product and all presentation is in the derived ZClasses. this will not only speed up your code but it will also make it easy to control presentation because that is stored in the ZODB and can be manipulated through the web. the only drawback is that a change in the underlying python product code requires you to restart zope. if you're like me and can't stand messy and kludgy code you will appreciate the extra effort spent on writing a real python zope product. for starters look at "How to create a Boring Product" at http://www.zope.org/Members/gtk/Boring/HowTo-Boring . this will explain some of the structure that is needed for a python class to become a "zope product". another guide is at http://www.zope.org/Members/Zen/howto/ProductAPITutorial . for the latest changes that need to be considered when writing a product for zope 2.2 read brian's guide at http://www.zope.org/Documentation/How-To/ProductAuthorUpdateGuide . a good deal of knowledge can be gained from simply looking at the code of products available in your zope install under zope/lib/python/Products. jens Jens Vagelpohl [EMAIL PROTECTED] Software Engineer www.digicool.com Digital Creations (888) 344-4332 Got Zope? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Gould Sent: Tuesday, July 04, 2000 21:11 To: [EMAIL PROTECTED] Subject: [Zope] What is the best way to do this? Hello zope-masters, I humbly ask your advice on several matters. I am making an internal website for a statewide student activist group with many members. It will hopefully feature discussion boards, a contact database, and a calendar of events. I want to make the users of the site part of the contact database, so that an entry in the database (a name, phone number, etc.) can be easily "promoted" into a user with a password and varying priveliges based on his/her role (volunteer, core member, board chair, etc.) Another feature I want to include is regional specialization - each contact/user, calendar event, and forum has an associated "region" - statewide or a specific campus or something in between. That way a user's default view of the statewide calendar won't be cluttered by irrelevant events, and a search through the contact database would by default only return results pertaining to the user's region. I've tried building some custom zClasses but when things start to get complex the dtml code gets really messy, so I think I should use external methods to do most of the work. Basically I'd appreciate any advice on how to put these ideas into code or pointers to relevant documentation. I don't mean to sound like "here's my very complicated plan, write the code for me", I just need some tips on how to get started. Thanks. -- Building highways to reduce traffic is like loosening your belt to reduce obesity. ___ 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] WorldPilot and UW-IMAP?
Greets, I'm experiencing an issue with WorldPilot not showing the body of messages that have attachments. I can only guess that this is because WorldPilot was designed for use with the Cyrus IMAP server and I'm using it on a stock RedHat system, which I presume sports UW-IMAP. I've searched around and not found too much detail about UW vs. Cyrus for WorldPilot. Can anyone enlighten me as to whether or not my problems are due to using UW-IMAP and generally whether it's worthwhile to suffer a Cyrus install, vs. a hack or patch to WorldPilot? I frankly don't want or need what Cyrus has to offer. I really like WorldPilot and I'm trying to push it on an office full of people, but you can imagine how thrilled they are about not being able to read select messages. They are starting to make noises about wanting to go back to Outlook now. (shudder) Thanks for any clues, Charlie -- ~ Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer... Visit the Radio For Peace International Website: http://www.rfpi.org/ ~ CLOBBER INTERNET SPAM: See!! http://spam.abuse.net/ Join!! http://www.cauce.org/ ~ QOTD: Failure is not an option. It's bundled with your software. ___ 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] cgi-tasks howto? stupid question
[EMAIL PROTECTED] (Rajil Saraswat) wrote: i tried out this but this isnt working out for me. can you point out the error. The DTML source is okay. This should work. when i submit the form the print page is outputted but the value of the textbox(valname) is not outputted. whats wrong? What do you mean by "the print page is outputted"? Do you see the source? Or is only the dtml-var valname part not displayed? Cheers, Nils -- [EMAIL PROTECTED] | [EMAIL PROTECTED] (preferred) [EMAIL PROTECTED] | [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] Comparing two dates WITH time?
Hello All, I need help again. How do I compare two dates that include full timestamps? If I try date_updated = ZopeTime() it works only for dates that do not include times... as soon as you have a time in the date_updated field, If the date_updated contains only a date (200/07/04 for example) it works flawlessly. What am I doing wrong? (Note that if I set the date_updated to yesterday with a time, it works also. is this a bug, or what? My logic would tell me that 2000/07/04 12:00:00 GMT+1 is smaller than 2000/07/04 11:59:00 GMT+1). Please someone tell me what's going on, I am beinning to feel that I am either asking too stupid questions, or I have problems no-one has any clue about. I am not sure what'd frighten me more... ;-) Best wishes, Nils ___ 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] dtml-var null
the following: dtml-var notes null="nbsp;" just doesn't seem to be working. any hints? ___ 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 )