Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f9e8b8c4
authored
May 29, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: remove copied success message mixin
parent
d579a218
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
18 deletions
+1
-18
circle/dashboard/views.py
+1
-18
No files found.
circle/dashboard/views.py
View file @
f9e8b8c4
...
...
@@ -27,6 +27,7 @@ from django.conf import settings
from
django.contrib.auth.models
import
User
,
Group
from
django.contrib.auth.views
import
login
,
redirect_to_login
from
django.contrib.messages
import
warning
from
django.contrib.messages.views
import
SuccessMessageMixin
from
django.core.exceptions
import
(
PermissionDenied
,
SuspiciousOperation
,
)
...
...
@@ -84,24 +85,6 @@ def search_user(keyword):
return
User
.
objects
.
get
(
email
=
keyword
)
# github.com/django/django/blob/stable/1.6.x/django/contrib/messages/views.py
class
SuccessMessageMixin
(
object
):
"""
Adds a success message on successful form submission.
"""
success_message
=
''
def
form_valid
(
self
,
form
):
response
=
super
(
SuccessMessageMixin
,
self
)
.
form_valid
(
form
)
success_message
=
self
.
get_success_message
(
form
.
cleaned_data
)
if
success_message
:
messages
.
success
(
self
.
request
,
success_message
)
return
response
def
get_success_message
(
self
,
cleaned_data
):
return
self
.
success_message
%
cleaned_data
class
FilterMixin
(
object
):
def
get_queryset_filters
(
self
):
...
...
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