• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 36. Registering New WebDAV Names... > Step 4: Registering the WebDAV Schem...

Step 4: Registering the WebDAV Schema

As mentioned previously in this chapter, registering a new WebDAV namespace is a simple two-step process. First, you declare the IPhoto schema to be a WebDAV namespace, and then you register an adapter for it, making it available for images. In the configure.zcml file, you add the following two directives:

01 <configure
02    xmlns="http://namespaces.zope.org/zope"
03    xmlns:dav="http://namespaces.zope.org/dav">
04
05 <dav:provideInterface
06     for="http://namespaces.zope.org/dav/photo/1.0"
07     interface=".interfaces.IPhoto" />
08
09 <adapter
10     provides=".interfaces.IPhoto"
11     for="zope.app.file.interfaces.IImage"
12     permission="zope.Public"
13     factory=".ImagePhotoNamespace"
14     trusted="True"/>
15
16 </configure>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint