This module is view-only. You do not have an enrolement for this module.

Create the resource model

Now we'll create the milton resource classes to represnt users and contacts.


A carddav server needs to be everything a normal webdav server is, plus some special carddav stuff. So we need a normal browsable tree structure. In this example we'll have

  • a RootResource which contains users
  • each user will be represented by a collection which contains a single address book resource,
  • and each address book displays the contacts. In this example we'll have the same list of contacts for any user
  • each contact is effectively a file