stalker.core.models.user.User

Inheritance diagram of stalker.core.models.user.User

class stalker.core.models.user.User(department=None, email='', first_name='', last_name='', login_name='', password='', permission_groups=[], projects=[], projects_lead=[], sequences_lead=[], tasks=[], last_login=None, **kwargs)[source]

Bases: stalker.core.models.entity.Entity

The user class is designed to hold data about a User in the system. It is derived from the entity.AuditEntity class

it adds these parameters to the AuditEntity class

Parameters:
  • email – holds the e-mail of the user, should be in [part1]@[part2] format
  • last_login – it is a datetime.datetime object holds the last login date of the user (not implemented yet)
  • login_name – it is the login name of the user, it should be all lower case. Giving a string or unicode that has uppercase letters, it will be converted to lower case. It can not be an empty string or None
  • first_name – it is the first name of the user, must be a string or unicode, middle name also can be added here, so it accepts white-spaces in the variable, but it will truncate the white spaces at the beginin and at the end of the variable and it can not be empty or None
  • last_name – it is the last name of the user, must be a string or unicode, again it can not contain any white spaces at the beggining and at the end of the variable and it can be an empty string or None
  • department – it is the department of the current user. It should be a Department object. One user can only be listed in one department. A user is allowed to have no department to make it easy to create a new user and create the department and assign the user it later.
  • password – it is the password of the user, can contain any character and it should be scrambled by using the key from the system preferences
  • permission_groups – it is a list of permission groups that this user is belong to
  • tasks – it is a list of Task objects which holds the tasks that this user has been assigned to
  • projects – it is a list of Project objects which holds the projects that this user is a part of
  • projects_lead – it is a list of Project objects that this user is the leader of, it is for back refefrencing purposes
  • sequences_lead – it is a list of Sequence objects that this user is the leader of, it is for back referencing purposes
__init__(department=None, email='', first_name='', last_name='', login_name='', password='', permission_groups=[], projects=[], projects_lead=[], sequences_lead=[], tasks=[], last_login=None, **kwargs)[source]

Methods

__init__(**kwargs[, department, email, ...])

Attributes

created_by gets and sets the User object who has created this
date_created gets and sets the datetime.datetime object which shows when
date_updated gets and sets the datetime.datetime object which shows when
department department othe user, is is a
description the description of the entity
email email of the user, accepts strings or unicodes
first_name first name of the user, accepts string or unicode
last_login last login time of the user as a datetime.datetime instance
last_name last name of the user, accepts string or unicode
login_name login name of the user, accepts string or unicode
name the name of the entity
nice_name this is the nice name of the SimpleEntity, it is a string which is a little bit more formatted than the name attribute
password password of the user, it is scrambled before stored in the
permission_groups permission groups that this users is a member of, accepts
projects projects those the current user assigned to, accepts
projects_lead projects lead by this current user, accepts
sequences_lead sequences lead by this user, accpets
tags a list of Tag objects which shows the related tags to the
tasks tasks assigned to the current user, accepts
updated_by gets and sets the User object who has updated this
created_by

gets and sets the User object who has created this AuditEntity

date_created

gets and sets the datetime.datetime object which shows when this object has been created

date_updated

gets and sets the datetime.datetime object which shows when this object has been updated

department[source]

department othe user, is is a :class:`~stalker.core.models.department.Department object

description

the description of the entity

email[source]

email of the user, accepts strings or unicodes

first_name[source]

first name of the user, accepts string or unicode

last_login

last login time of the user as a datetime.datetime instance

last_name[source]

last name of the user, accepts string or unicode

login_name[source]

login name of the user, accepts string or unicode

name

the name of the entity

nice_name

this is the nice name of the SimpleEntity, it is a string which is a little bit more formatted than the name attribute

password[source]

password of the user, it is scrambled before stored in the _password attribute

permission_groups[source]

permission groups that this users is a member of, accepts Group object

projects[source]

projects those the current user assigned to, accepts Project object

projects_lead[source]

projects lead by this current user, accepts Project object

sequences_lead[source]

sequences lead by this user, accpets Sequence objects

tags

a list of Tag objects which shows the related tags to the entity

tasks[source]

tasks assigned to the current user, accepts Task objects

updated_by

gets and sets the User object who has updated this AuditEntity

Previous topic

stalker.core.models.user

Next topic

stalker.core.models.version

This Page