Re: Remove zmi_views menus from zope.file?

Uli Fouquet <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk/Es5wACgkQXZ59JM1taztExgCeKDEY/fZpUA8K4pm71UvtAZ65
PQQAoKd7c3xB3fpib3kgCQVnyPNmacnF
=DZCA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.