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
8d48594b
Commit
8d48594b
authored
Oct 11, 2015
by
Daniel W Bond
Browse files
inexplicably these fields weren't model booleans before
parent
de25d47e
Changes
1
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/models.py
View file @
8d48594b
...
...
@@ -131,21 +131,15 @@ class Student(TimeStampedModel):
# social media accounts
# welcome walkthrough completion
completedName
=
False
completedPrivacy
=
False
completedMajor
=
False
completedSocial
=
False
completedName
=
models
.
BooleanField
(
default
=
False
)
completedPrivacy
=
models
.
BooleanField
(
default
=
False
)
completedMajor
=
models
.
BooleanField
(
default
=
False
)
completedSocial
=
models
.
BooleanField
(
default
=
False
)
slug
=
AutoSlugField
(
populate_from
=
'user'
,
unique
=
True
)
objects
=
StudentManager
()
def
get_percent_welcomed
():
# True is 1
doneness
=
sum
(
completedName
,
completedPrivacy
,
completedMajor
,
completedSocial
)
return
(
doneness
/
4
)
def
get_floor
(
self
):
try
:
floor
=
self
.
room
.
floor
...
...
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