Skip to content

Instantly share code, notes, and snippets.

@mitchellrj
Created November 25, 2011 14:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellrj/1393711 to your computer and use it in GitHub Desktop.
Save mitchellrj/1393711 to your computer and use it in GitHub Desktop.
z3c.form data manager for persistent dictionaries
<configure
xmlns="http://namespaces.zope.org/zope">
<adapter
factory=".datamanager.PersistentDictionaryField" />
</configure>
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