2019-02-02 15:01:18 +00:00
|
|
|
from django import forms
|
|
|
|
|
2019-03-16 17:06:27 +00:00
|
|
|
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-02-03 09:51:02 +00:00
|
|
|
|
2019-03-16 13:25:37 +00:00
|
|
|
class OrgaForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Organization
|
|
|
|
fields = ["name", "userlimit"]
|
2019-02-13 19:10:36 +00:00
|
|
|
|
2019-03-16 17:06:27 +00:00
|
|
|
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"]
|