jumpserver/apps/terminal/forms.py

21 lines
533 B
Python
Raw Normal View History

2016-10-19 10:33:14 +00:00
# ~*~ coding: utf-8 ~*~
#
from django import forms
2017-10-31 03:34:20 +00:00
from django.utils.translation import ugettext_lazy as _
2016-10-19 10:33:14 +00:00
from .models import Terminal
class TerminalForm(forms.ModelForm):
class Meta:
model = Terminal
2017-10-31 03:34:20 +00:00
fields = ['name', 'remote_addr', 'ssh_port', 'http_port', 'comment']
2016-10-19 10:33:14 +00:00
help_texts = {
2017-10-31 03:34:20 +00:00
'ssh_port': _("Coco ssh listen port"),
'http_port': _("Coco http/ws listen port"),
2016-10-19 10:33:14 +00:00
}
2016-12-26 16:59:52 +00:00
widgets = {
'name': forms.TextInput(attrs={'readonly': 'readonly'})
2017-10-31 03:34:20 +00:00
}