[Zope] WebDAV, Object types: Fie!
Iago
iago@iago.net
Mon, 25 Mar 2002 10:23:10 -0800
Didn't get a response on this, but did figure out an operative fix,
which I'll post about in the interests of making it useful for anyone
searching the mailing list archives:
try:
try:
mytext = context['content.html']()
except AttributeError:
mytext = context['content.html']
print mytext
except KeyError:
print "<p>No content here yet!</p>"
On Sat, 23 Mar 2002, Iago wrote:
> See, when I put this in a python script:
>
> print context['content.html']
>
> ... if it's a DTML document, I get the source of the DTML document,
> HTML escaped. By contrast, if it's a File (text/html), it just passes
> the HTML on through.
>
> So I guess there are two solutions, but I'll settle for one of them
>
> 1) How do I change the object type of an object? (I doubt this is
> possible, so a corollary would be, how do I get WebDAV to stop
> treating my .html files as DTML Documents)
>
> 2) How do I get a python script to recognize that if the content.html
> object is a DTML Document, it should not escape the HTML?
--
Fred Hicks <iago@iago.net>