Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
roomlist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
roomlist
Commits
84953f3e
Commit
84953f3e
authored
Nov 08, 2015
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removes confirmations/flags if student changes room
parent
b6368748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
roomlist/accounts/admin.py
roomlist/accounts/admin.py
+2
-1
roomlist/accounts/views.py
roomlist/accounts/views.py
+2
-0
No files found.
roomlist/accounts/admin.py
View file @
84953f3e
...
...
@@ -3,7 +3,8 @@ from __future__ import absolute_import, print_function
# core django imports
from
django.contrib
import
admin
# imports from your apps
from
.models
import
Student
,
Major
from
.models
import
Student
,
Major
,
Confirmation
admin
.
site
.
register
(
Major
)
admin
.
site
.
register
(
Student
)
admin
.
site
.
register
(
Confirmation
)
roomlist/accounts/views.py
View file @
84953f3e
...
...
@@ -236,6 +236,7 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
if
current_room
!=
form_room
:
me
.
times_changed_room
+=
1
Confirmation
.
objects
.
filter
(
student
=
me
).
delete
()
me
.
user
.
first_name
=
form
.
data
[
'first_name'
]
me
.
user
.
last_name
=
form
.
data
[
'last_name'
]
...
...
@@ -344,6 +345,7 @@ class WelcomePrivacy(LoginRequiredMixin, UpdateView):
if
current_room
!=
form_room
:
form
.
instance
.
times_changed_room
+=
1
Confirmation
.
objects
.
filter
(
student
=
me
).
delete
()
form
.
instance
.
completedPrivacy
=
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