User¶
Qualified name: tin.apps.users.models.User
- class User(*args, **kwargs)[source]¶
Bases:
AbstractBaseUser,PermissionsMixinA Tin user
- Parameters:
password (CharField) – Password
last_login (DateTimeField) – Last login
is_superuser (BooleanField) – Superuser status. Designates that this user has all permissions without explicitly assigning them.
id (AutoField) – Primary key: Id
username (CharField) – Username
full_name (CharField) – Full name
nickname (CharField) – Nickname
first_name (CharField) – First name
last_name (CharField) – Last name
email (CharField) – Email
is_staff (BooleanField) – Is staff
is_teacher (BooleanField) – Is teacher
is_student (BooleanField) – Is student
date_joined (DateTimeField) – Date joined
Relationship fields:
- Parameters:
groups (
ManyToManyFieldtoGroup) – Groups. The groups this user belongs to. A user will get all permissions granted to each of their groups. (related name:user_set)user_permissions (
ManyToManyFieldtoPermission) – User permissions. Specific permissions for this user. (related name:user_set)
Reverse relationships:
- Parameters:
logentry (Reverse
ForeignKeyfromLogEntry) – All log entries of this user (related name ofuser)social_auth (Reverse
ForeignKeyfromUserSocialAuth) – All social auth of this user (related name ofuser)taught_courses (Reverse
ManyToManyFieldfromCourse) – All taught courses of this user (related name ofteacher)courses (Reverse
ManyToManyFieldfromCourse) – All courses of this user (related name ofstudents)taught_periods (Reverse
ForeignKeyfromPeriod) – All taught periods of this user (related name ofteacher)periods (Reverse
ManyToManyFieldfromPeriod) – All periods of this user (related name ofstudents)submissioncap (Reverse
ForeignKeyfromSubmissionCap) – All submission caps of this user (related name ofstudent)cooldown_periods (Reverse
ForeignKeyfromCooldownPeriod) – All cooldown periods of this user (related name ofstudent)log_messages (Reverse
ForeignKeyfromQuizLogMessage) – All log messages of this user (related name ofstudent)submissions (Reverse
ForeignKeyfromSubmission) – All submissions of this user (related name ofstudent)final_submissions (Reverse
ForeignKeyfromPublishedSubmission) – All final submissions of this user (related name ofstudent)comments (Reverse
ForeignKeyfromComment) – All comments of this user (related name ofauthor)
Methods
Log in to Tin via Ion
get_next_by_date_joinedFinds next instance based on
date_joined.get_previous_by_date_joinedFinds previous instance based on
date_joined.Get social auth information from Ion
Attributes
REQUIRED_FIELDSUSERNAME_FIELDcommentsType: Reverse
ForeignKeyfromCommentcooldown_periodsType: Reverse
ForeignKeyfromCooldownPeriodcoursesType: Reverse
ManyToManyFieldfromCoursedate_joinedType:
DateTimeFieldemailType:
CharFieldfinal_submissionsType: Reverse
ForeignKeyfromPublishedSubmissionfirst_nameType:
CharFieldfull_nameType:
CharFieldgroupsType:
ManyToManyFieldtoGroupidType:
AutoFieldis_staffType:
BooleanFieldis_studentType:
BooleanFieldis_superuserType:
BooleanFieldis_teacherType:
BooleanFieldlast_loginType:
DateTimeFieldlast_nameType:
CharFieldlog_messagesType: Reverse
ForeignKeyfromQuizLogMessagelogentry_setType: Reverse
ForeignKeyfromLogEntrynicknameType:
CharFieldobjectspasswordType:
CharFieldperiodsType: Reverse
ManyToManyFieldfromPeriodshort_namesocial_authType: Reverse
ForeignKeyfromUserSocialAuthsubmissioncap_setType: Reverse
ForeignKeyfromSubmissionCapsubmissionsType: Reverse
ForeignKeyfromSubmissiontaught_coursesType: Reverse
ManyToManyFieldfromCoursetaught_periodsType: Reverse
ForeignKeyfromPerioduser_permissionsType:
ManyToManyFieldtoPermissionusernameType:
CharField- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned