
from django import  forms

class FlightrForm(forms.Form):
    flight_number = forms.CharField(max_length=30,  label="航班号", widget=forms.TextInput(attrs={'class': 'form-control'}))

    plane_type_choices = [
        ('波音', (
            ('1', '747'),
            ('2', '777'),
            ('3', '787'),
        )
         ),
        ('空客', (
            ('4', 'A300'),
            ('5', 'A310'),
            ('6', 'A320'),
            ('7', 'A350'),
        )
         ),
    ]

    plane_type = forms.ChoiceField(label='飞机型号', choices=plane_type_choices,widget=forms.Select)
    origination = forms.CharField(max_length=30,label="始发地", widget=forms.TextInput(attrs={'class': 'form-control'}))
    destination = forms.CharField(max_length=30,label="目的地", widget=forms.TextInput(attrs={'class': 'form-control'}))
    starting_time = forms.TimeField(label="始发时间",widget=forms.TimeInput(attrs={'class': 'form-control'}))

    departure_airport = forms.CharField(max_length=64, label="始发机场", widget=forms.TextInput(attrs={'class': 'form-control'}))
    landing_airport = forms.CharField(max_length=64, label="目的机场", widget=forms.TextInput(attrs={'class': 'form-control'}))
    arrival_time = forms.TimeField(label="到达时间",widget=forms.TimeInput(attrs={'class': 'form-control'}))
    first_class_price = forms.FloatField(label="头等舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'}))
    # highlevel_economy_class_price = forms.FloatField(label="高级经济舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'}))
    business_class_price = forms.FloatField(label="商务舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'}))
    economy_class_price = forms.FloatField(label="经济舱价格",widget=forms.NumberInput(attrs={'class': 'form-control'}))
    starting_date = forms.DateField(label="始发日期", widget=forms.DateInput(attrs={'class': 'form-control'}))
    ending_date = forms.DateField(label="终止日期", widget=forms.DateInput(attrs={'class': 'form-control'}))
class StartStopDateForm(forms.Form):
    starting_date = forms.DateField(label="始发日期", widget=forms.DateInput(attrs={'class': 'form-control'}))
    ending_date = forms.DateField(label="终止日期", widget=forms.DateInput(attrs={'class': 'form-control'}))
    flight_number = forms.CharField(max_length=30, label="航班号", widget=forms.TextInput(attrs={'class': 'form-control'}))
    # book_sum = forms.IntegerField(label="订票总数")
    # plane_capacity = forms.IntegerField(label="飞机容量")
class flight_number_Form(forms.Form):
    flight_number = forms.CharField(max_length=30, label="航班号", widget=forms.TextInput(attrs={'class': 'form-control'}))
class concrete_flight_id_Form(forms.Form):
    concrete_flight_id =  forms.CharField(max_length=30, label="航班id", widget=forms.TextInput(attrs={'class': 'form-control'}))
[((23, 17, 23, 104), 'django.forms.ChoiceField', 'forms.ChoiceField', (), '', False, 'from django import forms\n'), ((5, 78, 5, 126), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((24, 74, 24, 122), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((25, 74, 25, 122), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((26, 64, 26, 112), 'django.forms.TimeInput', 'forms.TimeInput', (), '', False, 'from django import forms\n'), ((28, 84, 28, 132), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((29, 82, 29, 130), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((30, 63, 30, 111), 'django.forms.TimeInput', 'forms.TimeInput', (), '', False, 'from django import forms\n'), ((31, 72, 31, 122), 'django.forms.NumberInput', 'forms.NumberInput', (), '', False, 'from django import forms\n'), ((33, 75, 33, 125), 'django.forms.NumberInput', 'forms.NumberInput', (), '', False, 'from django import forms\n'), ((34, 74, 34, 124), 'django.forms.NumberInput', 'forms.NumberInput', (), '', False, 'from django import forms\n'), ((35, 65, 35, 113), 'django.forms.DateInput', 'forms.DateInput', (), '', False, 'from django import forms\n'), ((36, 63, 36, 111), 'django.forms.DateInput', 'forms.DateInput', (), '', False, 'from django import forms\n'), ((38, 65, 38, 113), 'django.forms.DateInput', 'forms.DateInput', (), '', False, 'from django import forms\n'), ((39, 63, 39, 111), 'django.forms.DateInput', 'forms.DateInput', (), '', False, 'from django import forms\n'), ((40, 77, 40, 125), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((44, 77, 44, 125), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n'), ((46, 82, 46, 130), 'django.forms.TextInput', 'forms.TextInput', (), '', False, 'from django import forms\n')]