vpnmanager/manager/forms.py

24 lines
652 B
Python
Raw Normal View History

2019-02-02 15:01:18 +00:00
from django import forms
from .models import *
2019-02-02 15:01:18 +00:00
2019-03-16 13:25:37 +00:00
class NetworkForm(forms.ModelForm):
class Meta:
model = Network
fields = ["name", "intip", "extip", "organization"]
2019-03-16 13:25:37 +00:00
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"]