filter servers on webalizer app, show only webservers
This commit is contained in:
parent
1610c301cf
commit
f7a4fc749b
|
@ -27,8 +27,9 @@ class WebalizerAppform(PluginDataForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(WebalizerAppform, self).__init__(*args, **kwargs)
|
super(WebalizerAppform, self).__init__(*args, **kwargs)
|
||||||
self.fields['sftpuser'].widget = forms.HiddenInput()
|
self.fields['sftpuser'].widget = forms.HiddenInput()
|
||||||
qsServer = self.fields['target_server'].queryset.filter(name__in=WEB_SERVERS)
|
if self.instance.id is None:
|
||||||
self.fields['target_server'].queryset = qsServer
|
qsServer = self.fields['target_server'].queryset.filter(name__in=WEB_SERVERS)
|
||||||
|
self.fields['target_server'].queryset = qsServer
|
||||||
|
|
||||||
class WebalizerApp(AppType):
|
class WebalizerApp(AppType):
|
||||||
name = 'webalizer'
|
name = 'webalizer'
|
||||||
|
|
Loading…
Reference in New Issue