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
531e35f2
Commit
531e35f2
authored
Feb 09, 2015
by
Daniel W Bond
Browse files
added privacy choices
parent
a8122234
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/models.py
View file @
531e35f2
...
...
@@ -17,10 +17,22 @@ class Major(TimeStampedModel):
class
Student
(
TimeStampedModel
):
user
=
models
.
OneToOneField
(
User
)
# Django user includes a username, password, email, first name, and last name
FLOOR
=
'floor'
BUILDING
=
'building'
STUDENTS
=
'students'
PRIVACY_CHOICES
=
(
(
FLOOR
,
'My Floor'
),
(
BUILDING
,
'My Building'
),
(
STUDENTS
,
'All Students'
),
)
privacy
=
models
.
CharField
(
max_length
=
100
,
choices
=
PRIVACY_CHOICES
,
default
=
FLOOR
)
room
=
models
.
OneToOneField
(
Room
)
clas
=
models
.
OneToOneField
(
Class
)
major
=
models
.
OneToOneField
(
Major
)
# major = models.
# social media accounts
...
...
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