web.user.model.User

Package web :: Package user :: Module model :: Class User |
[hide private]
[frames] | no frames]

# Class User

source code

    declarative_base() --+
                         |
                        User

Instance Methods | [hide private]
__init__(self, name=u'', password='', email=u'') | source code
generate_temp_token(self) Generates a new temporal token valid for 48 hours | source code
send_activation_mail(self) | source code
send_recover_password_mail(self) | source code
validate_temp_token(self, token) Returns whether the given token is valid or not | source code
set_password(self, password) | source code
auth(self, password) | source code
is_super_user(self) | source code
is_active(self) | source code
__repr__(self) | source code

Class Methods | [hide private]
current(self) Returns current user. | source code
fields(self) | source code

Class Variables | [hide private]
| __tablename__ = `'user'`
| id = `Column(Integer, primary_key= True)`
| name = `Column(Unicode(60), unique= True)`
| password = `Column(String(128))`
| email = `Column(Unicode(256))`
| super_user = `Column(Boolean)`
| creation_date = `Column(DateTime())`
| state = `Column(Unicode(30))`
| temp_token = `Column(String(50))`
| temp_token_valid_until = `Column(DateTime(50))`
| user_organizative_unit = `Table('user_organizative_unit', metad`...``
| organizative_units = `relation('OrganizativeUnit', secondary= u`...``

Method Details | [hide private]

### current(self) Class Method | source code
Returns current user. If there's no user logged in, returns anonymous user.

Class Variable Details | [hide private]

  ### user_organizative_unit Value:
      Table('user_organizative_unit', metadata, Column('user_id', Integer, F
      oreignKey('user.id')), Column('organizative_unit_id', Integer, Foreign
      Key('organizative_unit.id')))

  ### organizative_units Value:
      relation('OrganizativeUnit', secondary= user_organizative_unit)