Re: [Zope-dev] Remove zmi_views menus from zope.file?
Well this has been bothering me as well, so I am delighted to see this thread. I started off with the release of ZTFY that includes a ZMI. I added in DTML. It could not find the zmi_views. When I remove those lines from ZCML all is happy, except the menu items are not there. I thought maybe zmi_views was renamed. Guess not based on this thread. I am stumped. There is some reason to believe that ZTFY implemented its own ZMI, sure looks the same. In which case I have to poke around in that package to figure out what the menu is called. But if that is not the case, I have no idea why it cannot find zmi_views. Maybe next I will try adding zope.file to see what happens. I have other things I am working on so I put this on the back burner, but interesting to see this thread. -- Regards Christopher Lozinski Check out my iPhone apps TextFaster and EmailFaster http://textfaster.com Expect a paradigm shift. http://MyHDLClass.com:8080
Hi Christopher, On Sun, 27 May 2012 20:28:49 -0500 Christopher Lozinski wrote:
Well this has been bothering me as well, so I am delighted to see this thread.
I started off with the release of ZTFY that includes a ZMI.
I added in DTML.
What package did you add?
It could not find the zmi_views. When I remove those lines from ZCML all is happy, except the menu items are not there.
I guess this is a similar issue. There might be other (non-zope.app) packages around that register stuff for zmi_views menus. These might be fixed as well.
I thought maybe zmi_views was renamed. Guess not based on this thread.
Don't know anything about ztfy, sorry.
I am stumped. There is some reason to believe that ZTFY implemented its own ZMI, sure looks the same. In which case I have to poke around in that package to figure out what the menu is called.
Hastily browsing over the sources there seems to be some 'zmi_views' component registered, but I am not sure it is the menu normally registered by zope.app.zcmlfiles. You might ask the author.
But if that is not the case, I have no idea why it cannot find zmi_views. Maybe next I will try adding zope.file to see what happens.
If you have no zope.app.zcmlfiles installed with ztfy, then you won't get any additional menu entries installed with a fixed zope.file (when it is released). But depending on zope.file should not choke your complete project anymore. Something bothering me is this cryptic import error that normally shows up if 'zmi_views' is not available. I then get some 'Could not import zmi_views from zope.app.menus' message (hope, I remember correctly). This 'zope.app.menus' seems to be not an egg or similar but an artificial package (created by zope.browsermenu?). This is confusing.
I have other things I am working on so I put this on the back burner, but interesting to see this thread.
It's at least interesting to find other non-zope.app packages that register zmi_views components. I think these could/should be fixed as well. I would do that, if people tell me what packages there are. Best regards, -- Uli
On 5/28/12 7:22 AM, Uli Fouquet wrote:
It's at least interesting to find other non-zope.app packages that register zmi_views components. I think these could/should be fixed as well. I would do that, if people tell me what packages there are.
Here you go. zope.app.dtmlpage-3.5.0-py2.6.egg Thank you. -- Regards Christopher Lozinski Check out my iPhone apps TextFaster and EmailFaster http://textfaster.com Expect a paradigm shift. http://MyHDLClass.com:8080
Hi Christopher, On Tue, 29 May 2012 06:05:57 -0500 Christopher Lozinski wrote:
On 5/28/12 7:22 AM, Uli Fouquet wrote:
It's at least interesting to find other non-zope.app packages that register zmi_views components. I think these could/should be fixed as well. I would do that, if people tell me what packages there are.
Here you go.
zope.app.dtmlpage-3.5.0-py2.6.egg
I'm afraid, this _is_ a zope.app package and IIRC correctly, they can expect the regular ZMI to exist/be registered. Unfortunately you can't expect zope.app packages to work out-of-the-box with newer non-zope.app packages. To make this package work (i.e. to get the zmi_views menu) you might include zope.app.zcmlfiles in the files required by your project. This, however, pulls in a huge bunch of other zope.app-packages often not compatible with more recent non-zope.app packages (and often not wanted anyway). A workaround (avoiding zope.app.zcmlfiles) might be to register such a 'zmi_view' menu in your own project/package's configure.zcml: <include package="zope.browsermenu" file="meta.zcml" /> <include package="zope.browsermenu" /> <browser:menu id="zmi_views" title="ZMI Views" /> <browser:menu id="zmi_actions" title="ZMI Actions" /> This would avoid the ImportError concerning 'zmi_views' but not neccessarily add a menu in your ztfy framework (because it looks like ztfy comes with its own set of menus). I think it would be best to ask the ztfy author about this. Beside this I might ask on zope-dev about 'fixing' also zope.app packages. Best regards, -- Uli
participants (2)
-
Christopher Lozinski -
Uli Fouquet