-
-
Notifications
You must be signed in to change notification settings - Fork 188
/
views.py
65 lines (47 loc) · 1.87 KB
/
views.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from swapper import load_model
from openwisp_controller.config.controller.views import (
DeviceChecksumView as BaseDeviceChecksumView,
)
from openwisp_controller.config.controller.views import (
DeviceDownloadConfigView as BaseDeviceDownloadConfigView,
)
from openwisp_controller.config.controller.views import (
DeviceRegisterView as BaseDeviceRegisterView,
)
from openwisp_controller.config.controller.views import (
DeviceReportStatusView as BaseDeviceReportStatusView,
)
from openwisp_controller.config.controller.views import (
DeviceUpdateInfoView as BaseDeviceUpdateInfoView,
)
from openwisp_controller.config.controller.views import (
VpnChecksumView as BaseVpnChecksumView,
)
from openwisp_controller.config.controller.views import (
VpnDownloadConfigView as BaseVpnDownloadConfigView,
)
Device = load_model('config', 'Device')
OrganizationConfigSettings = load_model('config', 'OrganizationConfigSettings')
Vpn = load_model('config', 'Vpn')
class DeviceChecksumView(BaseDeviceChecksumView):
model = Device
class DeviceDownloadConfigView(BaseDeviceDownloadConfigView):
model = Device
class DeviceUpdateInfoView(BaseDeviceUpdateInfoView):
model = Device
class DeviceReportStatusView(BaseDeviceReportStatusView):
model = Device
class DeviceRegisterView(BaseDeviceRegisterView):
model = Device
org_config_settings_model = OrganizationConfigSettings
class VpnChecksumView(BaseVpnChecksumView):
model = Vpn
class VpnDownloadConfigView(BaseVpnDownloadConfigView):
model = Vpn
device_checksum = DeviceChecksumView.as_view()
device_download_config = DeviceDownloadConfigView.as_view()
device_update_info = DeviceUpdateInfoView.as_view()
device_report_status = DeviceReportStatusView.as_view()
device_register = DeviceRegisterView.as_view()
vpn_checksum = VpnChecksumView.as_view()
vpn_download_config = VpnDownloadConfigView.as_view()