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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
b19ab633
authored
Sep 02, 2013
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: success messages for host actions
parent
5795d50c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
network/views.py
+10
-0
No files found.
network/views.py
View file @
b19ab633
...
@@ -618,6 +618,11 @@ def remove_host_group(request, **kwargs):
...
@@ -618,6 +618,11 @@ def remove_host_group(request, **kwargs):
# for post we actually remove the group from the host
# for post we actually remove the group from the host
elif
request
.
method
==
"POST"
:
elif
request
.
method
==
"POST"
:
host
.
groups
.
remove
(
group
)
host
.
groups
.
remove
(
group
)
messages
.
success
(
request
,
_
(
"Successfully removed
%(host)
s from "
"
%(group)
s group!"
%
{
'host'
:
host
,
'group'
:
group
}))
return
redirect
(
reverse_lazy
(
'network.host'
,
return
redirect
(
reverse_lazy
(
'network.host'
,
kwargs
=
{
'pk'
:
kwargs
[
'pk'
]}))
kwargs
=
{
'pk'
:
kwargs
[
'pk'
]}))
...
@@ -628,4 +633,9 @@ def add_host_group(request, **kwargs):
...
@@ -628,4 +633,9 @@ def add_host_group(request, **kwargs):
host
=
Host
.
objects
.
get
(
pk
=
kwargs
[
'pk'
])
host
=
Host
.
objects
.
get
(
pk
=
kwargs
[
'pk'
])
group
=
Group
.
objects
.
get
(
pk
=
group_pk
)
group
=
Group
.
objects
.
get
(
pk
=
group_pk
)
host
.
groups
.
add
(
group
)
host
.
groups
.
add
(
group
)
messages
.
success
(
request
,
_
(
"Successfully added
%(host)
s to group "
"
%(group)
s!"
%
{
'host'
:
host
,
'group'
:
group
}))
return
redirect
(
reverse_lazy
(
'network.host'
,
kwargs
=
kwargs
))
return
redirect
(
reverse_lazy
(
'network.host'
,
kwargs
=
kwargs
))
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