Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to use DictionaryField so it does not get picked up in "undesired scenarios" #33

Open
petri opened this issue Oct 24, 2015 · 0 comments

Comments

@petri
Copy link
Member

petri commented Oct 24, 2015

In DictionaryField datamanager docstring it says:(https://github.com/zopefoundation/z3c.form/blob/3.2.7/src/z3c/form/datamanager.py#L110-L114)

NOTE: Even though, this data manager allows nearly all kinds of
mappings, by default it is only registered for dict, because it
would otherwise get picked up in undesired scenarios. If you want
to it use for another mapping, register the appropriate adapter in
your application.

What does this mean? Why would it be not safe to register DictionaryField datamanager for PersistentDict (handy for using z3c.form with annotations)? Would it then be better to subclass PersistentDict and register DictionaryField for that (makes things potentionally brittle though)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant