[Product-Developers] plone.formwidget.masterselect from svn trunk

Patrick Gerken do3ccqrv at googlemail.com
Wed Mar 14 18:01:21 UTC 2012


It looks like you are not running your buildout in a virtualenv.

Zope is sniffing in your system python libraries.

More info about how to use virtualenv is here:

http://collective-docs.readthedocs.org/en/latest/tutorials/python.html#installing-plone-via-buildout

I'd add to it that you should run virtualenv with the
--no-site-packages flag. This is not needed any longer with the newest
version, but you might not use the newest version of virtualenv yet.

Best regards,

          Patrick


On Tue, Mar 13, 2012 at 15:41, SauZheR <sauzher at gmail.com> wrote:
> thanks maurits for your answer.
>
> This is full traceback: http://pastebin.com/rs9hUEtp.
> I agree with you about python version. I will try with the 2.6.
>
> About the permission....
> I disagree. Actually many use cases cover anonymous form fill and does not
> necessary have to fire content creation: often an email, or an sql statement
> is enough.
>
> Moreover, this browser view is only a json-wrapper for some vocabulary. Its
> purpose is retrieving filtered data to populate a widget. It does not have
> to know in which context it will be called.
>
> The vocabulary utility is registered without permission directive, and I can
> make a widget use this source naturally even by anonymous. So why to
> restrict in case of slave-field?
>
> I mean i know i can check-out all that stuff and change what i want. It's
> what i've done. But i think this product should cover more general use cases
>
> alessandro.
>
>
> 2012/3/13 Maurits van Rees <m.van.rees at zestsoftware.nl>
>>
>> Op 13-03-12 13:30, SauZheR schreef:
>>>
>>> in main configure.zcml
>>>
>>>  1. [...]
>>>  2. <!-- Include our dependencies -->
>>>  3. <includeDependencies package="." />
>>>  4.
>>>
>>>  5. <adapter factory=".widget.MasterSelectFieldWidget" />
>>>  6. <adapter factory=".widget.MasterSelectBoolFieldWidget" />
>>>  7.
>>>
>>>  8. <browser:page
>>>  9.          for=".interfaces.IMasterSelectWidget"
>>> 10.          name="masterselect-jsonvalue"
>>> 11.          class=".widget.MasterSelectJSONValue"
>>> 12.          permission="cmf.AddPortalContent"
>>> 13.          />
>>>
>>>
>>>
>>> line 3.
>>> what is that? With this line my zope does not start at all. it reports
>>> "dict are not hashable". (python 2.7, plone4.1)
>>> If I comment out it, simply, all works fine. Product is installable,
>>> usable, enjoyable.
>>
>>
>> Python 2.7 is not officially supported, though anything that does not work
>> with this version should be considered a bug worth reporting (and fixing).
>>  I doubt that is the problem here though.
>>
>> The includeDependencies line makes sure that the zcml of the dependencies
>> defined in setup.py is loaded.  It would be strange if loading that zcml
>> fails.  Do you have a full traceback from starting Zope in the foreground?
>>  I guess there is an error in one of the dependencies; maybe you need a
>> newer (or older) version.
>>
>>
>>
>>>
>>> line 12.
>>> why addPortalContent is required to retrieve some data (often from
>>> public vocabulary)? I think this should be relaxed to a more comfortable
>>> zope2.View (or public?)
>>
>>
>> I have not looked at this package myself, but I guess this browser view is
>> normally only used in an add or edit form and may make no sense for
>> anonymous users or users with only a View permission.
>>
>>
>> --
>> Maurits van Rees: http://maurits.vanrees.org/
>> Zest Software: http://zestsoftware.nl
>>
>> _______________________________________________
>> Product-Developers mailing list
>> Product-Developers at lists.plone.org
>> https://lists.plone.org/mailman/listinfo/plone-product-developers
>
>
>
>
> --
>   bye
> SauZheR
> ************************************
> l'iterazione è umana...
> la ricorsione, Divina!
> ************************************
> reply to: sauzher AT gmail DOT com
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
>


More information about the Product-Developers mailing list