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
b7db5f41
authored
Jun 27, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: add custom host modelform
parent
3a991101
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
network/forms.py
+7
-0
network/views.py
+2
-0
No files found.
network/forms.py
0 → 100644
View file @
b7db5f41
from
django.forms
import
ModelForm
from
firewall.models
import
Host
class
HostForm
(
ModelForm
):
class
Meta
:
model
=
Host
network/views.py
View file @
b7db5f41
...
...
@@ -5,6 +5,7 @@ from django_tables2 import SingleTableView
from
firewall.models
import
Host
from
.tables
import
HostTable
from
.forms
import
HostForm
class
IndexView
(
TemplateView
):
...
...
@@ -20,3 +21,4 @@ class HostList(SingleTableView):
class
HostDetail
(
UpdateView
):
model
=
Host
template_name
=
"network/host-edit.html"
form_class
=
HostForm
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