[Zope] ZClass index_html question
Peter Bengtsson
mail@peterbe.com
Thu, 19 Jul 2001 18:33:52 +0200
Smells like a bug.
I tried it too and it doesn't make sense.
With a humble rename from "something" to "index_html" or "index_html" to
"somethingelse" you go from 200 to 404 or 404 to 200.
Go to http://classic.zope.org:8080/Collector and search if the bug is
already there (yes, the search is tricky but is being replaced to something
even more complicated)
If it isn't, report it.
What I don't understand is that all products (all meta types) are instances
of classes and many of them have methods called index_html or define it as a
link to a method using the __str__.
There must be some golden rules about naming objects to index_html
As a sidenote,
create an instance and call it something less Zoponic and in the ZClass
create an object called index_html instead. "better practice".
Cheers, Peter
> Hi,
>
> I'm having a problem using a ZClass as a default view of a folder:
>
> When I add a ZClass instance to '/folderX', give it an id of
> 'index_html', and browse to '/folderX', I get an empty response. when I
> browse to '/folderX/index_html' I still get this error. when I browse to
> '/folderX/index_html/index_html' I get the correct page.
>
> The Zclass has ZObject as base class, and an index_html method I added.
>
> Is there a way to make a browse request to '/folderX' execute the
> index_html method of the index_html ZClqss in that folder?
>
> PS: this is the actual response I get from zope (and also lists the zope
> config I'm using):
>
> HTTP/1.0 200 OK
> Server: Zope/Zope 2.3.2 (source release, python 1.5.2, linux2)
> ZServer/1.1b1
> Date: Thu, 19 Jul 2001 14:55:27 GMT
> Content-Type: text/x-unknown-content-type
> Content-Length: 0
>
>
> --
> Maarten Slaets
> Contact: http://zope.neolabs.be/home/maarten/maarten.vcf
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> 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 )