-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathforms.py
24 lines (19 loc) · 1.08 KB
/
forms.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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django import forms
from django.forms import widgets
from delivery.models import Delivery
class DeliveryFrom(forms.ModelForm):
class Meta:
model = Delivery
exclude = ("id", "bar_data", "status")
widgets = {
'job_name': widgets.Select(attrs={'class': 'form-control','style': 'width:450px;'}),
'deploy_num': widgets.TextInput(attrs={'class': 'form-control', 'style': 'width:450px;', "readonly": "readonly"}),
'version': widgets.TextInput(attrs={'class': 'form-control', 'style': 'width:450px;'}),
'description': widgets.Textarea(attrs={'class': 'form-control', 'style': 'width:450px; height:100px'}),
'deploy_policy': widgets.Select(attrs={'class': 'form-control', 'style': 'width:450px;'}),
'shell': widgets.Textarea(attrs={'class': 'form-control', 'style': 'width:450px; height:100px'}),
'auth': widgets.Select(attrs={'class': 'form-control','style': 'width:450px;'}),
}