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

Chapter 27. Principal Annotations > Step 1: Creating the Principal Information ...

Step 1: Creating the Principal Information Interface

You need to add a file called interfaces.py to the newly created package. Then you should place the following interface in it:

01 from zope.i18n import MessageIDFactory
02 from zope.interface import Interface
03 from zope.schema import TextLine
04
05 _ = MessageIDFactory('principalinfo')
06
07
08 class IPrincipalInformation(Interface):
09     """This interface additional information about a principal."""
10
11     email = TextLine(
12         title=_("E-mail"),
13         description=_("E-mail Address"),
14         default=u"",
15         required=False)
16
17     ircNickname = TextLine(
18         title=_("IRC Nickname"),
19         description=_("IRC Nickname"),
20         default=u"",
21         required=False)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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