Zope and Frames (was Re: [Zope] ZPT and CSS)
Andre Meyer
a.meyer at hccnet.nl
Thu Dec 4 02:51:54 EST 2003
Hi again
As Tino says, this is not about frames per se, but in a <frameset> you
need to specify the framed pages. Therefore you need a reference and
that should be done in the __init__.py.
Or is there another possibility? Of course, the need to specify all
references to pages and images in __init__.py is not convenient,
particularly when you already have a database and need to recreate an
instance of your product. (btw this applies to a filesystem-based
approach).
========================================================================
Here is what I have in my __init__.py:
__doc__ = """Music Library initialisation module"""
__version__ = '0.1'
import mlib
import Piece
import Composer
from ImageFile import ImageFile
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
misc_ = {
'mlib.css':ImageFile('zpt/mlib.css', globals()),
'mlibPrint.css':ImageFile('zpt/mlibPrint.css', globals()),
'index_top':ImageFile('zpt/index_top.zpt', globals()),
'index_bottom':PageTemplateFile('zpt/index_bottom', globals()),
}
def initialize(context):
...
========================================================================
http://localhost:8080/music/misc_/mlib/index_top
This returns the zpt page unprocessed.
========================================================================
http://localhost:8080/music/misc_/mlib/index_bottom
This zpt page can be rendered without problems in the usual way (linked
from another zpt page), but when accessed as above it returns the
following error page:
Site Error
An error was encountered while publishing this resource.
exceptions.AttributeError
Sorry, a site error occurred.
Traceback (innermost last):
* Module ZPublisher.Publish, line 150, in publish_module
* Module ZPublisher.Publish, line 114, in publish
* Module Zope.App.startup, line 162, in zpublisher_exception_hook
AttributeError: Misc_ instance has no attribute '__error_log__'
________________________________________________________________________
Troubleshooting Suggestions
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an
error.
For more detailed information about the error, please refer to the error
log.
If the error persists please contact the site maintainer. Thank you for
your patience.
Additionally, in the console the following error is shown:
2003-12-04T08:41:03 PROBLEM(100) Zope Security Policy
'<ComputedAttribute object at 0x85db148>' passed as roles during
validation of 'index_bottom' is not a sequence.
========================================================================
Any help is appreciated.
kind regards
André
More information about the Zope
mailing list