Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
firewall_gui/views.py
+27
-14
No files found.
firewall_gui/views.py
View file @
14348bfb
...
...
@@ -524,20 +524,33 @@ def show_record(request, id=None):
}
return
HttpResponse
(
json
.
dumps
(
record
),
content_type
=
'application/json'
)
def
show_domain
(
request
,
id
):
domain
=
get_object_or_404
(
Domain
,
id
=
id
)
domain
=
{
'id'
:
domain
.
id
,
'name'
:
domain
.
name
,
'owner'
:
{
'id'
:
domain
.
owner
.
id
,
'name'
:
domain
.
owner
.
username
,
},
'created_at'
:
domain
.
created_at
.
isoformat
(),
'modified_at'
:
domain
.
modified_at
.
isoformat
(),
'ttl'
:
domain
.
ttl
,
'description'
:
domain
.
description
}
def
show_domain
(
request
,
id
=
None
):
try
:
domain
=
Domain
.
objects
.
get
(
id
=
id
)
domain
=
{
'id'
:
domain
.
id
,
'name'
:
domain
.
name
,
'owner'
:
{
'id'
:
domain
.
owner
.
id
,
'name'
:
domain
.
owner
.
username
,
},
'created_at'
:
domain
.
created_at
.
isoformat
(),
'modified_at'
:
domain
.
modified_at
.
isoformat
(),
'ttl'
:
domain
.
ttl
,
'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'
)
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