Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
14348bfb
authored
May 28, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall_gui: create new domain
parent
73000026
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
firewall_gui/views.py
+15
-2
No files found.
firewall_gui/views.py
View file @
14348bfb
...
@@ -524,8 +524,9 @@ def show_record(request, id=None):
...
@@ -524,8 +524,9 @@ def show_record(request, id=None):
}
}
return
HttpResponse
(
json
.
dumps
(
record
),
content_type
=
'application/json'
)
return
HttpResponse
(
json
.
dumps
(
record
),
content_type
=
'application/json'
)
def
show_domain
(
request
,
id
):
def
show_domain
(
request
,
id
=
None
):
domain
=
get_object_or_404
(
Domain
,
id
=
id
)
try
:
domain
=
Domain
.
objects
.
get
(
id
=
id
)
domain
=
{
domain
=
{
'id'
:
domain
.
id
,
'id'
:
domain
.
id
,
'name'
:
domain
.
name
,
'name'
:
domain
.
name
,
...
@@ -538,6 +539,18 @@ def show_domain(request, id):
...
@@ -538,6 +539,18 @@ def show_domain(request, id):
'ttl'
:
domain
.
ttl
,
'ttl'
:
domain
.
ttl
,
'description'
:
domain
.
description
'description'
:
domain
.
description
}
}
except
:
domain
=
{
'id'
:
None
,
'name'
:
None
,
'owner'
:
{
'name'
:
None
,
},
'created_at'
:
None
,
'modified_at'
:
None
,
'ttl'
:
None
,
'description'
:
''
}
return
HttpResponse
(
json
.
dumps
(
domain
),
content_type
=
'application/json'
)
return
HttpResponse
(
json
.
dumps
(
domain
),
content_type
=
'application/json'
)
def
make_autocomplete
(
entity
,
name
=
'name'
):
def
make_autocomplete
(
entity
,
name
=
'name'
):
...
...
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