|
@@ -29,15 +29,20 @@ class RegisterUserForm(UserCreationForm):
|
|
|
model = get_user_model()
|
|
|
fields = ['username', 'password1', 'password2']
|
|
|
|
|
|
+SPECS = [
|
|
|
+ ('0', 'Парикмахер'),
|
|
|
+ ('1', 'Визажист'),
|
|
|
+ ('2', 'Стилист'),
|
|
|
+]
|
|
|
+
|
|
|
class OrderLocalForm(forms.ModelForm):
|
|
|
order_synced = forms.ModelChoiceField(queryset = Orders.objects.all(), label="Заказ")
|
|
|
#resource_id = forms.ModelChoiceField(queryset = Resource.objects.all(), label="Ресурс")
|
|
|
- specialization = forms.CharField(label="Специализация рабочего места")
|
|
|
+ specialization = forms.ChoiceField(choices=SPECS, label="Специализация рабочего места")
|
|
|
address = forms.CharField(label="Адрес коворкинга")
|
|
|
daily_price = forms.CharField(label="Стоимость в день")
|
|
|
- payment_transaction_id = forms.CharField(label="Транзакция платежа")
|
|
|
- attempts = forms.CharField(label="Попытка")
|
|
|
- order_place_type = forms.CharField(label="Тип заказа")
|
|
|
+ date_start = forms.DateField(label="Дата начала аренды")
|
|
|
+ date_end = forms.DateField(label="Дата завершения аренды")
|
|
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
super(OrderLocalForm, self).__init__(*args, **kwargs)
|
|
@@ -50,11 +55,9 @@ class OrderLocalForm(forms.ModelForm):
|
|
|
'specialization',
|
|
|
'address',
|
|
|
'daily_price',
|
|
|
- 'payment_transaction_id',
|
|
|
- 'attempts',
|
|
|
- 'order_place_type',
|
|
|
+ 'date_start',
|
|
|
+ 'date_end',
|
|
|
]
|
|
|
- #fields = '__all__'
|
|
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
super().__init__(*args, **kwargs)
|