[Update] terminal可以更改名称

pull/1044/head
ibuler 2018-02-28 10:39:38 +08:00
parent f886e7c2f5
commit 1e5b9fb3ef
1 changed files with 12 additions and 8 deletions

View File

@ -25,18 +25,22 @@ def get_all_replay_storage():
class TerminalForm(forms.ModelForm):
command_storage = forms.ChoiceField(choices=get_all_command_storage(),
label=_("Command storage"))
replay_storage = forms.ChoiceField(choices=get_all_replay_storage(),
label=_("Replay storage"))
command_storage = forms.ChoiceField(
choices=get_all_command_storage(),
label=_("Command storage")
)
replay_storage = forms.ChoiceField(
choices=get_all_replay_storage(),
label=_("Replay storage")
)
class Meta:
model = Terminal
fields = ['name', 'remote_addr', 'ssh_port', 'http_port', 'comment', 'command_storage', 'replay_storage']
fields = [
'name', 'remote_addr', 'ssh_port', 'http_port', 'comment',
'command_storage', 'replay_storage',
]
help_texts = {
'ssh_port': _("Coco ssh listen port"),
'http_port': _("Coco http/ws listen port"),
}
widgets = {
'name': forms.TextInput(attrs={'readonly': 'readonly'})
}