[Zope] Re: LocalFS problems with @import-ing stylesheets
Samuel Souk-aloun wrote: I can confirm the problem, the stylesheet is not rendered from localfs with firefox the problem is caused by an incorect http header "text/plain" instead of "text/css" I've tried to add a type_map to the LocalFS but the content-type does not change so, for me, it is clearly a LocalFS issue anyone knows how to hardcode this content-type in LocalFS.py ? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) add this line to the typemap: .css text/css DTMLDocument It works for me I hardcoded it into LocalFS.py (the last line is the one you need to add): _types = { '.html': ('text/html', 'DTMLDocument'), '.htm': ('text/html', 'DTMLDocument'), '.css': ('text/css', 'DTMLDocument'), # ***SmileyChris *NEW* ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: DTML-tree Custom sort
It's really more a cool way to do lists than if statements :) I recommend reading through some of Dive Into Python (http://diveintopython.org/) for lots more cool hands-on tips on Python programming. Chapter 3 for a good overview of the uses of Python's different data types. Alex Renier wrote: Great thank you both!!! I never knew you could do if-statements like that. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: DTML-tree Custom sort
Alex Renier wrote: Thanks for your help AJ I get this: Error Type: SyntaxError Error Value: invalid syntax (line 1) I think that Andreas meant ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Problem with links containing non-ascii characters in StructuredText
Maurits van Rees wrote: Hi, I have a problem getting links to function in StructuredText when they have non-ascii characters in the title. This can of course be solved by using html entities like 'ö'. But I have just started using utf-8 so I don't have to bother myself with writing html entities. This wouldn't solve the overall problem - not all utf-8 characters have html entities. I work with Māori macrons which don't so I'll be listening keenly to discussion about this problem. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Page Template security problem
Dieter Maurer wrote: *HOWEVER* note that proxy roles are not passed to called objects. Thus, "emaildetails.htm" does not run with proxy roles. If it accesses objects from "admin folder", then you will get an "Unauthorized". A possible solution could be: let "sendDetail" access and process all protected information and pass the results only (hopefully elementary and therefor unrestricted) to the page template for formatting. Let "sendDetail" then send the formatted message itself. Thank You Dieter, The problem I was having is that I didn't realise that proxy roles are not passed to called objects. Like you suggested, I called all protected objects from the proxyed script and passed the return values through to the page template. All working wonderfully now. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Page Template security problem
I'm having a problem figuring out how to keep things secure while allowing a proxied script to call a page template correctly. /details/sendDetails Python script that is publicly available, receives an email address and sends that person thier details stored in the database. The script has proxy rights of "Administrator". /admin/person/emaildetails.htm Page template that is secured (admin folder is Administrator only for "view" and "access contents information"). The anonymous user is prompted for authentication. If I change emaildetails.htm to a simple "test" text file it works, the problem seems to lie when the template tries to access any script from the context. I tried to give those scripts proxy rights too but that had no effect. Am I going about this the wrong way, is there something I missed, or am I just going to have to revert to rewriting the whole details.htm as DTML? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Zope 2.8 Installation trouble on XP
Just to chirp in, I just tried to install 2.8 on my dev box and I am receiving the same error (XP SP2) Previous versions of Zope that have been (and still are) installed: 2.7.3, 2.7.5, 2.7.6 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: WebDAV Locked Item Unlockable
[EMAIL PROTECTED] wrote: Hi. How do I unlock a locked WebDAV item (in this case a ZPT) edit with Dreamweaver MX. The locked item does not show up on the Control Panel > WebDAV Lock Manager, and the lock even survives a Zope restart. All attempts to edit or remove the item fail. This seems to be happening on a regular basis in my Zope 2.7.4 / FC3 install when editing content through Dreamweaver MX WebDAV. Have you checked for a .lck file in the same folder? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: DreamWeaver files -> ZPTs: How?
Ken Winter wrote: I know you can do it by naming the file in DW with the *.pt extension. But the trouble with this is, subsequently DreamWeaver doesn’t recognize it as anything that it can edit. Here's how to make DW work with pt, zpt, dtm and dtml extensions Open "Program Files\Macromedia\Dreamweaver MX 2004\Configuration\DocumentTypes\MMDocumentTypes.xml" Change: To: Open "Documents and Settings\{USERNAME}\Application Data\Macromedia\Dreamweaver MX 2004\Configuration\Extensions.txt" Add the first line from: HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,TPL,LASSO,JSP,JSF,VB,VBS,VTM,VTML,INC,JAVA,EDML,WML:All Documents To: HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,STM,SSI,JS,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,CSS,CFM,CFML,CFC,DTM,DTML,TLD,TXT,PHP,PHP3,PHP4,PHP5,PT,TPL,LASSO,JSP,JSF,VB,VBS,VTM,VTML,INC,JAVA,EDML,WML,ZPT:All Documents Add these lines (After "...:HTML Documents" line is good): DTM,DTML:Zope DTML Documents PT,ZPT:Zope Page Templates ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )