Created
November 25, 2011 14:58
-
-
Save mitchellrj/1393711 to your computer and use it in GitHub Desktop.
z3c.form data manager for persistent dictionaries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configure | |
xmlns="http://namespaces.zope.org/zope"> | |
<adapter | |
factory=".datamanager.PersistentDictionaryField" /> | |
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from persistent.dict import PersistentDict | |
from z3c.form import datamanager | |
from z3c.form.interfaces import IDataManager | |
from zope.component import adapts | |
from zope.interface import implements | |
from zope.schema.interfaces import IField | |
class PersistentDictionaryField(datamanager.DictionaryField): | |
adapts(PersistentDict, IField) | |
implements(IDataManager) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment