35 lines
2.1 KiB
Python
35 lines
2.1 KiB
Python
# # coding=utf-8
|
||
from django import forms
|
||
from django.contrib.auth.forms import AuthenticationForm
|
||
from django.utils.translation import gettext_lazy as _
|
||
from django.core.exceptions import ValidationError
|
||
from .models import *
|
||
|
||
|
||
class RegistrationForm(forms.ModelForm):
|
||
class Meta:
|
||
model = Route
|
||
exclude = [
|
||
'name', 'name_plural', 'order', 'createDT', 'modifiedDT', 'enable', 'json_data',
|
||
'receive_msg_by_sms', 'owner', 'owner_type'
|
||
]
|
||
|
||
|
||
# class RegistrationForm(forms.Form):
|
||
# type_transport = forms.ChoiceField(choices=type_transport_choices, initial='avia', required=True, label='Выберите способ перевозки')
|
||
# departure_DT = forms.DateTimeField(required=True, label='Дата и время выезда')
|
||
# arrival_DT = forms.DateTimeField(required=True, label='Дата и время прибытия')
|
||
# from_country = forms.CharField(required=True, label='Пункт выезда')
|
||
# to_country = forms.CharField(required=True, label='Пункт приезда')
|
||
# # from_city = forms.CharField(required=True)
|
||
# # to_city = forms.CharField(required=True)
|
||
# from_place = forms.ChoiceField(choices=transfer_location_choices, initial='other', required=True, label='Откуда можете забрать?')
|
||
# to_place = forms.ChoiceField(choices=transfer_location_choices, initial='other', required=True, label='Куда можете доставить?')
|
||
# cargo_type = forms.ChoiceField(choices=cargo_type_choices, initial='parcel', required=True, label='Могу перевезти')
|
||
# weight = forms.IntegerField(required=True, label='Укажите вес до (кг)')
|
||
# phone = forms.CharField(required=True, label='Укажите номер для связи')
|
||
# add_phone = forms.CharField(required=True, label='Дополнительный номер')
|
||
# receive_msg_by_email = forms.BooleanField(initial=False, required=True, label='Получать уведомления по E-mail')
|
||
# # receive_msg_by_sms = forms.BooleanField(initial=False, required=True)
|
||
# # owner = forms.IntegerField(required=True)
|