cybertools/organize
helmutm 1cd603c65f work-in-progress: cybertools.organize: more on IPerson interface
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1206 fd906abe-77d9-0310-91a1-e0d9ade77398
2006-05-10 18:43:39 +00:00
..
browser created 'cybertools.organize' package, removed 'cybertools.contact', moved imports (in testing code only) of the latter package to the former one. 2006-05-10 16:10:51 +00:00
__init__.py created 'cybertools.organize' package, removed 'cybertools.contact', moved imports (in testing code only) of the latter package to the former one. 2006-05-10 16:10:51 +00:00
interfaces.py work-in-progress: cybertools.organize: more on IPerson interface 2006-05-10 18:43:39 +00:00
party.py work-in-progress: cybertools.organize 2006-05-10 16:25:37 +00:00
README.txt work-in-progress: cybertools.organize 2006-05-10 16:25:37 +00:00
task.py created 'cybertools.organize' package, removed 'cybertools.contact', moved imports (in testing code only) of the latter package to the former one. 2006-05-10 16:10:51 +00:00
tests.py created 'cybertools.organize' package, removed 'cybertools.contact', moved imports (in testing code only) of the latter package to the former one. 2006-05-10 16:10:51 +00:00

Organizations: Persons, Institutions, Addresses...
==================================================

  ($Id$)

Let's start with a Person:

  >>> from cybertools.organize.party import Person
  >>> john = Person(u'Smith')
  >>> john.lastName
  u'Smith'
  >>> john.firstName
  u''
  >>> john.birthDate is None
  True
  >>> john.addresses
  {}

A Person object knows the age of the person:
  
  >>> john.age

  >>> from datetime import date
  >>> john.birthDate = date(1980, 3, 25)
  >>> john.age
  26

  >>> john.firstName = u'John'
  >>> john.firstName
  u'John'

Addresses
---------

Let's create an address and assign it to a person:

  >>> from cybertools.organize.party import Address
  >>> addr = Address(u'New York', u'Broadway 1')
  >>> john.addresses['standard'] = addr
  >>> john.addresses['standard'].street
  u'Broadway 1'