vpnmanager/manager/forms.py

23 lines
652 B
Python

from django import forms
from .models import *
class NetworkForm(forms.ModelForm):
class Meta:
model = Network
fields = ["name", "intip", "extip", "organization"]
class OrgaForm(forms.ModelForm):
class Meta:
model = Organization
fields = ["name", "userlimit"]
class DeviceForm(forms.ModelForm):
class Meta:
model = Device
fields = ["serial", "secret", "password", "mac", "name", "model", "organization", "network", "ssid", "key", "wifi", "update", "reboot"]
class WifiForm(forms.ModelForm):
class Meta:
model = Wifi
fields = ["serial", "ssid", "key", "organization"]