Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
red_brick_board
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ciella Francisco
red_brick_board
Commits
fb455254
Commit
fb455254
authored
Mar 11, 2024
by
gab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added role+bio fields to User
parent
122e640c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
models.py
redbrickboard/accounts/models.py
+9
-1
No files found.
redbrickboard/accounts/models.py
View file @
fb455254
...
@@ -3,11 +3,19 @@ from django.contrib.auth.models import AbstractUser
...
@@ -3,11 +3,19 @@ from django.contrib.auth.models import AbstractUser
# Create your models here.
# Create your models here.
class
CustomUser
(
AbstractUser
):
class
CustomUser
(
AbstractUser
):
ROLE_CHOICES
=
[
(
"STUDENT"
,
"Student"
),
(
"ORG"
,
"Organization"
),
(
"ALUMNI"
,
"Alumni"
),
(
"FACULTY"
,
"Faculty"
),
]
username
=
None
username
=
None
email
=
models
.
EmailField
(
unique
=
True
,
db_index
=
True
)
email
=
models
.
EmailField
(
unique
=
True
,
db_index
=
True
)
first_name
=
models
.
CharField
(
blank
=
False
,
max_length
=
150
)
first_name
=
models
.
CharField
(
blank
=
False
,
max_length
=
150
)
last_name
=
models
.
CharField
(
blank
=
False
,
max_length
=
150
)
last_name
=
models
.
CharField
(
blank
=
False
,
max_length
=
150
)
role
=
models
.
CharField
(
max_length
=
7
,
blank
=
False
,
choices
=
ROLE_CHOICES
)
bio
=
models
.
TextField
(
blank
=
True
,
max_length
=
150
)
USERNAME_FIELD
=
'email'
USERNAME_FIELD
=
'email'
REQUIRED_FIELDS
=
[]
REQUIRED_FIELDS
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment