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
92c35a3d
Commit
92c35a3d
authored
May 23, 2017
by
Daniel W Bond
Browse files
account disconnect messge is now SUCCESS rather than INFO
parent
534da663
Changes
1
Show whitespace changes
Inline
Side-by-side
roomlist/accounts/adapter.py
View file @
92c35a3d
...
@@ -5,6 +5,7 @@ from django.core.urlresolvers import reverse
...
@@ -5,6 +5,7 @@ from django.core.urlresolvers import reverse
from
django.contrib
import
messages
from
django.contrib
import
messages
from
django.http
import
HttpResponseRedirect
from
django.http
import
HttpResponseRedirect
# third party imports
# third party imports
from
allauth.account.adapter
import
get_adapter
as
get_account_adapter
from
allauth.socialaccount.adapter
import
DefaultSocialAccountAdapter
from
allauth.socialaccount.adapter
import
DefaultSocialAccountAdapter
from
allauth.socialaccount.views
import
ConnectionsView
from
allauth.socialaccount.views
import
ConnectionsView
from
allauth.exceptions
import
ImmediateHttpResponse
from
allauth.exceptions
import
ImmediateHttpResponse
...
@@ -90,7 +91,13 @@ class RemoveSocialConfirmationView(LoginRequiredMixin, ConnectionsView):
...
@@ -90,7 +91,13 @@ class RemoveSocialConfirmationView(LoginRequiredMixin, ConnectionsView):
return
super
(
RemoveSocialConfirmationView
,
self
).
get
(
request
,
*
args
,
**
kwargs
)
return
super
(
RemoveSocialConfirmationView
,
self
).
get
(
request
,
*
args
,
**
kwargs
)
def
form_valid
(
self
,
form
):
def
form_valid
(
self
,
form
):
return
super
(
RemoveSocialConfirmationView
,
self
).
form_valid
(
form
)
# copied directly, except using SUCCESS rather than INFO
get_account_adapter
().
add_message
(
self
.
request
,
messages
.
SUCCESS
,
'socialaccount/messages/'
'account_disconnected.txt'
)
form
.
save
()
return
HttpResponseRedirect
(
self
.
get_success_url
())
def
get_success_url
(
self
):
def
get_success_url
(
self
):
return
reverse
(
'update_student'
,
return
reverse
(
'update_student'
,
...
...
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