RE: [Zope-dev] Emailing html web pages: how can I render page as the anonymous user?
My favorite way is to support this is to create skins. We have two skins: printable emailable that fixes the standard_html_* stuff, and can even be used to override the content rendering at a deeper level, if needed (overriding document_view etc). We can use the same way to support WAP, Avantgo etc also. A printable version of a page is simply done by doing http://myurl/contenturl?portal_skin=printable Pretty cool. IMO, this is a better use of skins than to use it for languages; languages are better managed by Localizer or ZBabel. Bye, -- Bjorn [EMAIL PROTECTED] -Original Message- From: Chris McDonough [mailto:[EMAIL PROTECTED]] Posted At: Sunday, October 07, 2001 04:53 Posted To: Zope Developer Conversation: [Zope-dev] Emailing html web pages: how can I render page as the anonymous user? Subject: Re: [Zope-dev] Emailing html web pages: how can I render page as the anonymous user? Hi Don, Instead of including the rendered standard_html_header and standard_html_footer in the emailed page, why not have a emailed_html_header and emailed_html_footer, which are prerendered copies of a toolbar and other things as seen by the anonymous user? The setuid/setgid thing is tricky and since the outcomes will be about the same (always showing folks an anonymous-based toolbar), including static content is easier. - C Don Hopkins wrote: I'm using the CMF, and I've implement an email_this_page method, that prompts for an email address, then uses the sendmail tag to email the html contents of a page, like yahoo and other sites commonly do. I want to include the standard_html_header and standard_html_footer in the email message, so it's easy for the recipient to navigate to the web site. But when I tested it out, I noticed I got all the management buttons like Reject and Reconfigure portal in the email message! Of course they required authentication, but it'd rather render the page as it would be seen by the anonymous user. What I need is something like the effect of a setuid/seteuid system calls, that temporarily downgrades the Zope user to anonymous, while it renders the html headers and footers. As a stab in the dark, I tried changing the proxy role of the dtml script that uses the sendmail tag and renders the html, but I still got the management buttons. Is it as simple as temporarily changing some properties of the request? Or is there an extension or product that can do that? Thanks! http://www.WorldTradeCenterDisaster.com:8080/Memorial -Don ___ 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 ) -- Chris McDonoughZope Corporation http://www.zope.org http://www.zope.com Killing hundreds of birds with thousands of stones ___ 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] RFC: Date property requiers valid date (no more)
Johan - I have done a similiar hotfix by using None - which I think is a better alternative than ''. If you want to see all of the source, download the following Product, http://www.zope.org/Members/natsukashi/Products/CMFPropertyCore, and look inside the file CMFPropertyCore/LinkPropertyManager.py Thanks Joseph, Great input. Regards, Johan Carlsson ___ 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] compiling Zope 2.4.1 on Mac OS 10.1
Has anyone managed to do this procedure with Python 2.0? The -flat_namespace flag does not help and I'm still getting twolevel_namespace errors. I'm running Zope 2.3.2 and I'd like to avoid the startup warnings, as well as any possible incompatibilities with Python 2.1/2.2. Itai Jens Vagelpohl wrote: i think i found a working solution. since my knowledge of compilers and linkers isn't the greatest i'll just explain what i did. trying to compile python2.1.1 on OS X 10.1 failed for me displaying the very same error. searching through apple's discussion i found the following link: http://fink.sourceforge.net/doc/porting/shared.php it explains that some linker/compiler default options have changed. in order to get python compiled and running i edited the toplevel Makefile after running ./configure and edited the lines starting with LDSHARED and BLDSHARED, this is what they look like now in my setup: LDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress BLDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress notice the -flat_namespace switch, this gets rid of the new default twolevel_namespace that complains about undefined warning. running make was now successful and i was able to compile and run Zope 2.4.1. you will probably have to recompile your python to set that switch under 10.1. i only did some light testing, no guarantees and before using this in production you might want to read up on those compiler/linker options... jens -- -- Itai Tavor -- Je sautille, donc je suis.-- [EMAIL PROTECTED]-- - Kermit the Frog -- -- -- -- If you haven't got your health, you haven't got anything -- ___ 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] ZTables and/or Catalog plugable brains?
-Original Message- From: Casey Duncan [mailto:[EMAIL PROTECTED]] Sent: Friday, 5 October 2001 10:55 PM To: Jay, Dylan; '[EMAIL PROTECTED]' Subject: Re: [Zope-dev] ZTables and/or Catalog plugable brains? On Thursday 04 October 2001 07:34 pm, Jay, Dylan allegedly wrote: I tried using ZClasses but it seems to run slow and take up space. Instead I'm using Catalog (without ZCatalog) to contain the data. I'm presuming this will be quite efficient (comments welcome). Yup that should be pretty efficient. Plus you can index and query the thing fairly easily. Now to my question, How do Catalog plugable brains work? I've looked but can't see what the brain class has to look like to work. My first attempts don't seem to work. The classes are created but don't contain the data. Is the record data passed into the constructor? I'm not an expert on brains per se, but my understanding is that they allow you to wrap functionality from a particular class around data stored in a table (such as a Catalog or an external database) without making each record an instance of the class. This is how, when the Catalog returns data, you get the getURL and getObject methods for each record (among others). TinyTable and Z SQL Methods also support this functionality, and it is exposed in the management interface. This would allow you to store the actual data as regular metadata elements in the Catalog, and get objects out when you query it. It would avoid storing the data twice, once in the objects and again in the metadata and all of the disadvantages this causes in terms of storage and synchronization. But what is the API? I understand that for SQLMethods you just have a class that assumes the existance of attributes that have the same name as you result fields. I tried doing this with the Catalog code but it seem to doesn't work. Am I doing it right or the the Catalog brains work differently? ___ 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] compiling Zope 2.4.1 on Mac OS 10.1
if you have no compelling reason for running Zope 2.3.2 and Python 2.0 i highly suggest moving up to a combination of Python 2.1 (which is much more OSX-friendly) and Zope 2.4.1. jens On Sunday, October 7, 2001, at 09:04 , Itai Tavor wrote: Has anyone managed to do this procedure with Python 2.0? The -flat_namespace flag does not help and I'm still getting twolevel_namespace errors. I'm running Zope 2.3.2 and I'd like to avoid the startup warnings, as well as any possible incompatibilities with Python 2.1/2.2. Itai Jens Vagelpohl wrote: i think i found a working solution. since my knowledge of compilers and linkers isn't the greatest i'll just explain what i did. trying to compile python2.1.1 on OS X 10.1 failed for me displaying the very same error. searching through apple's discussion i found the following link: http://fink.sourceforge.net/doc/porting/shared.php it explains that some linker/compiler default options have changed. in order to get python compiled and running i edited the toplevel Makefile after running ./configure and edited the lines starting with LDSHARED and BLDSHARED, this is what they look like now in my setup: LDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress BLDSHARED= $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress notice the -flat_namespace switch, this gets rid of the new default twolevel_namespace that complains about undefined warning. running make was now successful and i was able to compile and run Zope 2.4.1. you will probably have to recompile your python to set that switch under 10.1. i only did some light testing, no guarantees and before using this in production you might want to read up on those compiler/linker options... jens -- -- Itai Tavor -- Je sautille, donc je suis.-- [EMAIL PROTECTED]-- - Kermit the Frog -- -- -- -- If you haven't got your health, you haven't got anything -- ___ 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 )