Package camelot :: Package camelot :: Package model :: Module authentication :: Class Person
[hide private]
[frames] | no frames]

Class Person

source code


Person represents natural persons, these can be given access to the system and as such require a username.

Username is required, other fields are optional, there is no password because authentication is supposed to happen through the operating system services or other.

Nested Classes [hide private]
  Admin
Instance Methods [hide private]
 
name(self) source code
 
__unicode__(self) source code
Class Methods [hide private]
 
getOrCreatePerson(cls, username) source code
Class Variables [hide private]
  username = Field(Unicode(40), required= True, index= True, uni...
  first_name = Field(Unicode(40))
  last_name = Field(Unicode(40))
  middle_name = Field(Unicode(40))
  personal_title = Field(Unicode(10))
  suffix = Field(Unicode(3))
  sex = Field(Unicode(1), default= u'M')
  birthdate = Field(Date())
  martial_status = Field(Unicode(1))
  social_security_number = Field(Unicode(12))
  passport_number = Field(Unicode(20))
  passport_expiry_date = Field(Date())
  is_staff = Field(Boolean, default= False, index= True)
  is_active = Field(Boolean, default= True, index= True)
  is_superuser = Field(Boolean, default= False, index= True)
  last_login = Field(DateTime(), default= datetime.datetime.now)
  date_joined = Field(DateTime(), default= datetime.datetime.now)
  picture = Field(camelot.types.Image(upload_to= 'person-picture...
  comment = Field(Text)
  employers = OneToMany('EmployerEmployee', inverse= 'establishe...
  directed_organizations = OneToMany('DirectedDirector', inverse...
  shares = OneToMany('SharedShareholder', inverse= 'established_...

Inherited from Party: addresses, contact_mechanisms

Method Details [hide private]

name(self)

source code 
Decorators:
  • @property
Overrides: Party.name

Class Variable Details [hide private]

username

Value:
Field(Unicode(40), required= True, index= True, unique= True)

picture

Value:
Field(camelot.types.Image(upload_to= 'person-pictures'), deferred= Tru\
e)

employers

Value:
OneToMany('EmployerEmployee', inverse= 'established_to')

directed_organizations

Value:
OneToMany('DirectedDirector', inverse= 'established_to')

shares

Value:
OneToMany('SharedShareholder', inverse= 'established_to')