This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
themis.datatypes/themis/datatypes/configure.zcml

62 lines
2.0 KiB
XML

<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:grok="http://namespaces.zope.org/grok"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:z3c="http://namespaces.zope.org/z3c"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="themis.datatypes">
<!-- Include configuration for dependencies listed in setup.py -->
<includeDependencies package="." />
<!-- Grok the package to initialise schema interfaces and content classes -->
<grok:grok package="." />
<browser:page
for="themis.datatypes.deputy.IDeputy"
name="json"
class=".views.DeputyJson"
permission="zope2.View"
/>
<browser:page
for="themis.datatypes.deputy.IDeputy"
name="photo"
class=".views.DeputyPhoto"
permission="zope2.View"
/>
<!-- Register an extension profile to make the product installable -->
<genericsetup:registerProfile
name="default"
title="Themis data types"
description="..."
directory="profiles/default"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
<adapter for="themis.datatypes.deputy.IDeputy"
provides="themis.datatypes.deputy.INameFromPersonNames"
factory="themis.datatypes.deputy.NameFromPersonNames" />
<adapter for="themis.datatypes.ministry.IMinistry"
provides="themis.datatypes.deputy.INameFromPersonNames"
factory="themis.datatypes.deputy.NameFromPersonNames" />
<adapter factory=".address.AddressFieldWidget"/>
<adapter factory=".address.AddressConverter"/>
<z3c:widgetTemplate
mode="display"
widget=".address.IAddressWidget"
layer="z3c.form.interfaces.IFormLayer"
template="address_display.pt"/>
<z3c:widgetTemplate
mode="input"
widget=".address.IAddressWidget"
layer="z3c.form.interfaces.IFormLayer"
template="address_input.pt"/>
</configure>