[Grok-dev] Re: Recipe for "egg-like" reuse?
sebastian at urbantalk.se
Wed Apr 9 07:18:53 EDT 2008
I did <include package="AddApp" /> (when it should have been "addapp")
and when it didn't work I was trying other ways, eventually ending up
with an entry
<grok:grok package="protoncms" />
in configure.zcml. I have reverted to your suggestion and it works
equally well. Now I am only struggling to get the grok.Permissions to
work again. I have defined:
But I still get the error "Undefined permission 'protoncms.EditUser'".
Traceback (most recent call last):
File "parts/app/runzope", line 112, in ?
zope.app.twisted-3.4.0a1-py2.4.egg/zope/app/twisted/main.py", line 74,
145, in setup
py2.4.egg/zope/app/appsetup/appsetup.py", line 111, in config
context = xmlconfig.file(file, context=context, execute=execute)
line 612, in file
610, in execute_actions
py2.4.egg/grok/util.py", line 43, in make_checker
py2.4.egg/grok/util.py", line 59, in check_permission
martian.error.GrokError: Undefined permission 'protoncms.EditUser' in
<class 'protoncms.protonuser.Edit'>. Use grok.Permission first.
configure.zcml", line 4.2-4.27
<grok:grok package="." />
9 apr 2008 kl. 12.51 skrev Uli Fouquet:
> Sebastian Ware wrote:
>> Now I am pretty sure that I am having problems with the grokking
>> process. If I move my edit view from AddApp to MasterApp then it is
>> found by the publisher and all is well.
>> In other words views defined in MasterApp are working as expected,
>> views defined in AddApp seem not to be registered. They are however
>> processed in some way since I will get an error if I choose a non-
>> existing class as grok.context().
> Did you include the necessary ZCML-fragment in your buildout.cfg as I
> <include package="addapp" /> <!-- NEW ENTRY -->
> Otherwise your AddApp won't be grokked on startup. No views, no fun.
> you have defined an application in AddApp, this should also show up in
> the admin-UI then.
> Kind regards,
More information about the Grok-dev