~pcardune/timeclock/main

« back to all changes in this revision

Viewing changes to src/timeclock/person.py

  • Committer: Paul Carduner
  • Date: 2007-05-02 06:11:18 UTC
  • Revision ID: paul@carduner.net-20070502061118-xehvsgikmr9ekb2t
added timezone support for persons and now people can change their own stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
from zope.app.authentication import principalfolder
5
5
from zope.traversing.browser.interfaces import IAbsoluteURL
6
6
from zope.app import zapi
 
7
from zope.annotation.interfaces import IAttributeAnnotatable
7
8
 
8
9
from interfaces import IPerson, IPersonContainer, IPersonContained
9
10
import app
11
12
class Person(principalfolder.InternalPrincipal, Contained):
12
13
    """An implementation of IPerson"""
13
14
 
14
 
    implements(IPerson, IPersonContained)
 
15
    implements(IPerson, IPersonContained,
 
16
               IAttributeAnnotatable)
15
17
 
 
18
    timeZone = 'UTC'
16
19
 
17
20
class PersonContainer(principalfolder.PrincipalFolder):
18
21
    """Container of persons"""
19
22
 
20
 
    implements(IPersonContainer)
 
23
    implements(IPersonContainer,
 
24
               IAttributeAnnotatable)
21
25
 
22
26
def getPersonFromPrincipal(principal):
23
27
    """Adapter from IPrincipal to IPerson"""