Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
623b21d9
Commit
623b21d9
authored
Sep 07, 2015
by
Daniel W Bond
Browse files
added gender options to models
parent
101cd40f
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/models.py
View file @
623b21d9
...
...
@@ -103,12 +103,30 @@ class Student(TimeStampedModel):
(
STUDENTS
,
'All Students'
),
)
FEMALE
=
'female'
MALE
=
'male'
TRANS
=
'trans'
OTHER
=
'other'
GENDER_CHOICES
=
(
(
FEMALE
,
'female'
),
(
MALE
,
'male'
),
(
TRANS
,
'trans'
),
(
OTHER
,
'other'
),
)
# selectmultiple in forms
gender
=
models
.
CharField
(
max_length
=
25
,
choices
=
GENDER_CHOICES
,
blank
=
True
)
privacy
=
models
.
CharField
(
max_length
=
100
,
choices
=
PRIVACY_CHOICES
,
default
=
FLOOR
)
room
=
models
.
ForeignKey
(
Room
,
null
=
True
,
blank
=
True
)
clas
=
models
.
ForeignKey
(
Class
,
null
=
True
,
blank
=
True
)
major
=
models
.
ForeignKey
(
'Major'
,
null
=
True
,
blank
=
True
)
# from when first logged in through peoplefinder, stored for later
original_major
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
)
# social media accounts
slug
=
AutoSlugField
(
populate_from
=
'user'
,
unique
=
True
)
...
...
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