Re: [Zope-dev] ZPatterns based CD example. Halfway there! Need help
James Johnson wrote: I've got the storage entry part down. I can't seem to get the data out. It seems to me that I would put an Index_html method in the specialist but I get a aq_base error when trying to put one in. So I put it in my ZClass dataskin. Here is the code I'm using below. I tried to access it many ways. All I get is a blank sheet. I tried using dtml-let myPPS="propertysheets.get('cd_info')" dtml-var "myPPS.getProperty('artist')' But it says object does not have getProperty. Hmm. Add a SkinScript method to your Specialist, under the Data-PlugIns tab, with something like this: WITH self.propertysheets.get('cd_info') COMPUTE artist=getProperty('artist'), label=getProperty('label') You can then write your ZClass index_html and use dtml-var artist or dtml-artist; where you want the artist, and similarly with label. -- 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 )
[Zope-dev] Re: Re: [Zope-dev] ZPatterns based CD example. Halfway there! Need help
another person had this problem earlier. It may have been because they used quotes like dtml-var "foo". It should be dtml-var foo. I get the same keyerror on foo?. I actually had ended up with the code you just gave from previous post. There must be a problem if others have had keyerrors. My understanding is that by placing the skinscript in the specialist would be a blackbox thing and placing it in the specialists rack with the other providers would be a whitebox thing. So seeing that the index_html is a method of the Class folder is should "see" the artist property. So I need to call the specialist and do a propertyMap() or something on it first? What could cause a keyerror? Seems to me that myPPS has no keys because its empty. I'm using win98,winNT4, win2000, redhat 6.2, zope 2.2.1, ZPatterns 4.2.2Alpha or the latest. I to work all of the platforms. For the most part it's going to to be the win98 platform I'm developing on. I can't wait to pump out my first ZPattern product. 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 )
Re: [Zope-dev] HiperDOM xmlc
Shane Hathaway writes: [EMAIL PROTECTED] wrote: The only thing I _don't_ feel good about this kind of template is that, in practice, we will probably lose the benefits of things like dtml-var standard_html_header - meaning, when you want to change the header of your site, you'll have to edit all your templates. I agree this is a problem, and speaking from experience, changing all templates is not an acceptable compromise. For www.zope.org that would mean including the standard template in nearly every page, everywhere, because the pages on www.zope.org are nearly all "templates" themselves. We would lose one of the primary benefits of Zope. Another unacceptable compromise is including a variant of standard_html_header and _footer on every page (as is done now). One reason is because it is not possible to write standard_html_header/_footer using well-formed XML. The header begins the "html" tag, while the footer ends it. In fact, most sites these days put the beginning of a table in _header and the end of the table in _footer. Objects containing non-well-formed XML aren't compatible with a DOM-based solution. This has been one of the points of discussion here at DC. The only reasonable solution we've come up with is automatically wrapping the results of the rendering in an acquired object with a fixed name such as standard_page_template. The other solution that I have tried to wrestle with is introducing some kind of multiple view system with automatic selection of the default view. But in reality, the standard_page_template solution would make the multiple view system possible as well. So what does everyone think? Is standard_page_template the right thing to do? Is there a better way? Help! I did not (yet) look at HiperDOM and xmlc. Nor am I familiar with dreamweaver and friends. Thus, maybe, I should not speak up. If one is really interested in a separation of content and presentation (which I feel is good), then the "standard_html_*" were wrong in the first place. It forces the content author to prepare for presentation. The "page_template" proposal is much better in this respect, as it is external to the content. Of cause, there should be a way to select between different page templates and not be bound to a fixed template (already mentioned by a previous responder). The other question deals with template modularity. If a single modification should influence several templates, then this is best addressed by building the templates out of modules. The modification of a module then affects all templates that use it. Modularization would be possible if e.g. XSLT is used for presentation. I do not know, whether Dreamweaver has a modularization concept. I hope so. The current "header/footer" fragments are not optimal wrt. modularization, as tightly coupled stuff ("footer" must close everything that "header" opened) is separated into different objects. It is much better to have a module that contains both the page prolog and epilog and a placeholder for the actual content, maybe filled in with sample text that later is replaced by the content, i.e. a page template. It is good that you are forced to use well formed XML in your modules. 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 )
[Zope] Ann: ZGDChart 0.4.2.b
ZGDChart with more chart styles, data from non-SQL sources, plus Linux binaries. Also, gone are the original poxy colors on the charts. Now with relaxing shades of pastel. See the samples and grab the files at: http://www.zope.org/Members/teyc/ZGDChart/index_html All credits for this release goes to Hung Jung Lu who persisted long enough to get it working on Linux and then enhancing it. ___ 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] repost of ImplicitAcquirerWrapper
On Fri, Sep 15, 2000 at 07:03:35PM -0400, Chalu Kim wrote: Has anyone run into this problem? Zope Error Zope has encountered an error while publishing this resource. Error Type: SystemError Error Value: Failed to import class ImplicitAcquirerWrapper from module Acquisition What s the traceback? When do you encounter this? If you see this when trying to start Zope, how did you install Zope? From source? If so, did you run python wo_pcgi.py or w_pcgi.py first? It could also be that you have a module Acquisition elsewhere in your Python path. Try the following: start up Python (just about anywhere except in your Zope/lib/python dir), and type: import sys import Acquisition If the second line doesn't give you an exception, type sys.modules['Acquisition'] It should tell you where it imported the module Acquisition from. You could also try this in Zope/lib/python (cd to that directory). -- 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] Using GUF (generic user folder) under 2.2.x?
Hi! I've experienced the same problem with GUF (which is why I am desperately waiting for the LoginManager HOWTO). Everything looks fine first, but the login screen will keep reappearing. Which part of the walkthrough could be out of date, the password? ;-) Maybe you could say a word or two about what to consider under 2.2.1, Stuart. Thanks in advance, Danny -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Stuart Bishop Gesendet: Samstag, 16. September 2000 05:56 An: Nathan Bell Cc: [EMAIL PROTECTED] Betreff: Re: [Zope] Using GUF (generic user folder) under 2.2.x? On Mon, 11 Sep 2000, Nathan Bell wrote: Is there a way to get GUF to work under the new version of zope? I know it worked quite easily under older versions, but I can't get it to run at all under 2.2.1. GUF happily runs under 2.2.1. The walkthrough documentation is probably out of date now though, and I havn't had the opertunity to update 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 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] ANNOUNCE: KM|Net News 1.1.1
Hi, I've had a few reports of trouble with KM|Net News and Zope 2.2. I have fixed the reported problem, but have not extensively tested KMNN with Zope 2.2. If you're using KMNN with Zope 2.2, you can pick up the new release here: http://www.zope.org/Members/taz/kmnn Kevin ___ 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] set date property from External Method
Hi I would like to set a property with type 'date' from an External Method. Because the properties all seem to be saved as a string, in Python I do: self.prop_datetime = time.strftime('%Y/%m/%d %H:%M:%S.000 GMT+1',time.localtime(time.time())) This results in a optically (!) correct value like: 2000/09/16 17:49:02.000 GMT+1 However, when I call a document which uses the date, as with: dtml-with prop_datetime dtml-var "'%s %s om %s' % (dd(), aMonth(), TimeMinutes())" /dtml-with Zope produces an error: Zope has encountered an error while publishing this resource. Error Type: NameError Error Value: dd The funny thing is, when I manage the properties and just do a 'save changes', the error is gone and the date is displayed correctly ... It seems to me that the date property is not saved as a string after all ? But what then ? I tried self.prop_datetime = time.localtime(time.time()) and self.prop_datetime = time.time(); both result in a string representing their value but none of them results in a date/time value Gijs Reulen ___ 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] ZOPE - Size reduction ???
George wrote: I recently transformed my web site into a zope site. It's fantastic no question about that but I am a bit warried about the size of the web site. I already had to ask for user quota increase and it looks like I'll have to do it again soon. I got rid of the tutorial, products I did not need, the unnecessary doc files I deleted the quick start directory and I am flushing and packing the database often. What else can I do to decrease the size of ZOPE? Check your logs. Depending on how it si set up, your logs may be in youir directory,and counting against your quota. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] Ann: ZGDChart 0.4.2.b
there two small bugs in "addZGDChart.dtml" which causes it to display only a white page at least under netscape: here is the diff: 7,10d6 table trtd width="10%"/td td 37c33 --- /form On Sat, 16 Sep 2000, Chui Tey wrote: ZGDChart with more chart styles, data from non-SQL sources, plus Linux binaries. Also, gone are the original poxy colors on the charts. Now with relaxing shades of pastel. See the samples and grab the files at: http://www.zope.org/Members/teyc/ZGDChart/index_html All credits for this release goes to Hung Jung Lu who persisted long enough to get it working on Linux and then enhancing it. ___ 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 ) Mit freundlichen Grüßen Joachim Schmitz AixtraWare, Ing. Büro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 ___ 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 to PostgreSQL Connection?
Hi I'm with some troubles to connect a freshly installed Zope 2.2.1 on a Conectiva Linux 5.0 (glibc-2.1.2, the rest is the same as Red Hat 6.x) to a PostgreSQL 7.0.2 database. The ZPyGreSQLDA (http://www.zope.org/Members/reedstrm/ZPyGreSQLDA-rjr) "is broken". I tried to get the PoPyDA working, but cannot compile the PoPy module (it complains about libcrypt - that is already installed). Can someone point's me to a useful documentation about what is needed to get PoPy compiled, or another way to connect a Zope 2.2.1 to a PostgreSQL database. Trying to compile PoPy 1.3.6: [root@bit PoPy-1.3.6]# ./configure loading cache ./config.cache checking for python... /usr/bin/python checking python version... 1.5 checking python installation prefix... /usr checking python installation exec_prefix... /usr checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python1.5/site-packages checking location of python shared modules... $(exec_prefix)/lib/python1.5/site-packages checking for main in -lcrypt... no Warning: next test can fail because of a missing libcrypt checking for PQconnectStart in -lpq... no configure: error: can't build without PostgreSQL libraries Do we have a crypt library somewhere? [root@bit PoPy-1.3.6]# locate lib/libcryp /lib/libcrypt-2.1.2.so /lib/libcrypt.so.1 /usr/lib/libcrypto.so /usr/lib/libcrypto.so.0 /usr/lib/libcrypto.so.0.9.4 /usr/lib/libcrypt.a /usr/lib/libcrypt.so /usr/lib/libcrypto.a Who owns that files? [root@bit PoPy-1.3.6]# locate lib/libcryp | xargs rpm -qf | sort | uniq glibc-2.1.2-11cl glibc-devel-2.1.2-11cl openssl-0.9.4-4cl openssl-devel-0.9.4-4cl []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ 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] Dynamically render DTML?
Is it possible to return dtml from python, and have it rendered correctly on the page? for example, the python might look like this... def get_header(somevar=1): if somevar==1: return 'dtml-var standard_html_header' else: return 'dtml-var other_html_header' The dtml document in the zodb might look like this... dtml-var expr="get_header(1)" Body text dtml-var standard_html_footer When this gets rendered, it's as if the dtml document had dtml-var standard_html_header in place of the get_header call. I understand how to call external methods from dtml, etc. I just want to know if it's possible to get the string returned rendered as dtml. Mark --- Mark Gibson Kaivo, Inc. www.kaivo.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 )
Re: [Zope] Zope to PostgreSQL Connection?
Cesar A. K. Grossmann writes: I'm with some troubles to connect to a PostgreSQL 7.0.2 database. The ZPyGreSQLDA (http://www.zope.org/Members/reedstrm/ZPyGreSQLDA-rjr) "is broken". Trying to compile PoPy 1.3.6: [root@bit PoPy-1.3.6]# ./configure Warning: next test can fail because of a missing libcrypt checking for PQconnectStart in -lpq... no configure: error: can't build without PostgreSQL libraries The problem seems to be that "configure" does not find the "PostgreSQL libraries". The "libcrypt" reference is probably only a warning. You may look at the various "config.*" files to obtain more information about the configuration process and why it failed. 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 )