jumpserver/apps/applications/forms.py

19 lines
513 B
Python
Raw Normal View History

2016-10-19 10:33:14 +00:00
# ~*~ coding: utf-8 ~*~
#
from django import forms
from django.utils.translation import ungettext_lazy as _
from .models import Terminal
class TerminalForm(forms.ModelForm):
class Meta:
model = Terminal
fields = ['name', 'remote_addr', 'type', 'url', 'comment']
2016-10-19 10:33:14 +00:00
help_texts = {
'url': 'Example: ssh://192.168.1.1:22 or http://jms.jumpserver.org, that user login'
}
2016-12-26 16:59:52 +00:00
widgets = {
'name': forms.TextInput(attrs={'readonly': 'readonly'})
}