You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XML registry export does not work with a dict-ish schema as attached.
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 155, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 337, in publish_module
Module ZPublisher.WSGIPublisher, line 255, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 61, in call_object
Module plone.app.registry.browser.exportxml, line 34, in __call__
Module plone.app.registry.browser.exportxml, line 96, in export
Module lxml.etree, line 1018, in lxml.etree._Element.text.__set__
Module lxml.etree, line 710, in lxml.etree._setNodeText
Module lxml.etree, line 698, in lxml.etree._createTextNode
Module lxml.etree, line 1491, in lxml.etree._utf8
TypeError: Argument must be bytes or unicode, got 'dict'
# noqa: D100
from plone.app.registry.browser.controlpanel import ControlPanelFormWrapper
from plone.autoform import directives
from ugent.registry import DictListRegistryEditForm
from z3c.form.browser.multi import MultiWidget
from zope.interface import Interface
from zope.schema import Dict
from zope.schema import List
from zope.schema import TextLine
from ..config import message_factory as _
class IAuthorshipSettings(Interface):
"""Authorship settings.
"""
directives.widget("departments", MultiWidget)
departments = List(
title=_("Departments"),
value_type=Dict(
title=_("Department"),
key_type=TextLine(title=_("Key")),
value_type=TextLine(title=_("Value")),
),
required=False,
)
directives.widget("subdepartments", MultiWidget)
subdepartments = List(
title=_("Subdepartments"),
value_type=Dict(
title=_("Subdepartment"),
key_type=TextLine(title=_("Key")),
value_type=TextLine(title=_("Value")),
),
required=False,
)
class AuthorshipControlPanelForm(DictListRegistryEditForm):
"""Control panel form for authorship.
"""
schema = IAuthorshipSettings
label = "Authorship Settings"
description = "Authorship settings."
dictlists = (
(
"departments",
(
"department",
"name",
"coordinators",
"backups",
),
),
(
"subdepartments",
(
"department",
"subdepartment",
"name",
"providers",
"editors",
),
),
)
class AuthorshipControlPanel(ControlPanelFormWrapper):
"""Control panel for authorship.
"""
form = AuthorshipControlPanelForm
The text was updated successfully, but these errors were encountered:
Plone 5.2
The XML registry export does not work with a dict-ish schema as attached.
The text was updated successfully, but these errors were encountered: