Commit b7db5f41 by Őry Máté

network: add custom host modelform

parent 3a991101
from django.forms import ModelForm
from firewall.models import Host
class HostForm(ModelForm):
class Meta:
model = Host
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment