|
|
|
@ -27,13 +27,13 @@ class ExpositionForm(forms.Form): |
|
|
|
""" |
|
|
|
""" |
|
|
|
types = [(item1, item2) for item1, item2 in EXPOSITION_TYPE] |
|
|
|
types = [(item1, item2) for item1, item2 in EXPOSITION_TYPE] |
|
|
|
type = forms.ChoiceField(required=False, choices=types) |
|
|
|
type = forms.ChoiceField(required=False, choices=types) |
|
|
|
logo = forms.ImageField(label='Logo', required=False) |
|
|
|
logo = forms.ImageField(label='Logo', required=False, max_length=500) |
|
|
|
|
|
|
|
|
|
|
|
country = forms.ChoiceField(label='Страна', choices=[(c.id, c.name) for c in Country.objects.all()]) |
|
|
|
country = forms.ChoiceField(label='Страна', choices=[(c.id, c.name) for c in Country.objects.all()]) |
|
|
|
# creates select input with empty choices cause it will be filled with ajax |
|
|
|
# creates select input with empty choices cause it will be filled with ajax |
|
|
|
city = forms.CharField(label='Город', widget=forms.HiddenInput()) |
|
|
|
city = forms.CharField(label='Город', widget=forms.HiddenInput()) |
|
|
|
|
|
|
|
|
|
|
|
address = forms.CharField(label='Адресс', widget=LocationWidget, required=False) |
|
|
|
address = forms.CharField(label='Адрес', widget=LocationWidget, required=False) |
|
|
|
|
|
|
|
|
|
|
|
phone = forms.CharField(label='Телефон', required=False, |
|
|
|
phone = forms.CharField(label='Телефон', required=False, |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Введите телефон'})) |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Введите телефон'})) |
|
|
|
@ -48,7 +48,7 @@ class ExpositionForm(forms.Form): |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Год основания'})) |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Год основания'})) |
|
|
|
total_area = forms.CharField(label='Общая выставочная площадь', required=False, |
|
|
|
total_area = forms.CharField(label='Общая выставочная площадь', required=False, |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Общая выст. площадь'})) |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Общая выст. площадь'})) |
|
|
|
closed_area = forms.CharField(label='Закрытая выствочная площадь', required=False, |
|
|
|
closed_area = forms.CharField(label='Закрытая выставочная площадь', required=False, |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Закр. выст. площадь'})) |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Закр. выст. площадь'})) |
|
|
|
open_area = forms.CharField(label='Открытая выставочная площадь', required=False, |
|
|
|
open_area = forms.CharField(label='Открытая выставочная площадь', required=False, |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Откр. выст. площадь'})) |
|
|
|
widget=forms.TextInput(attrs={'placeholder': 'Откр. выст. площадь'})) |
|
|
|
@ -62,10 +62,10 @@ class ExpositionForm(forms.Form): |
|
|
|
children_room = forms.BooleanField(label='Детская комната', required=False) |
|
|
|
children_room = forms.BooleanField(label='Детская комната', required=False) |
|
|
|
disabled_service = forms.BooleanField(label='Сервис для инвалидов', required=False) |
|
|
|
disabled_service = forms.BooleanField(label='Сервис для инвалидов', required=False) |
|
|
|
conference_centre = forms.BooleanField(label='Конгресс-центр', required=False) |
|
|
|
conference_centre = forms.BooleanField(label='Конгресс-центр', required=False) |
|
|
|
business_centre = forms.BooleanField(label='Бизнес центр', required=False) |
|
|
|
business_centre = forms.BooleanField(label='Бизнес-центр', required=False) |
|
|
|
online_registration = forms.BooleanField(label='Онлайн регистрация', required=False) |
|
|
|
online_registration = forms.BooleanField(label='Онлайн регистрация', required=False) |
|
|
|
cafe = forms.BooleanField(label='Кафе', required=False) |
|
|
|
cafe = forms.BooleanField(label='Кафе', required=False) |
|
|
|
terminals = forms.BooleanField(label='Информационые терминалы', required=False) |
|
|
|
terminals = forms.BooleanField(label='Информационные терминалы', required=False) |
|
|
|
parking = forms.BooleanField(label='Парковка', required=False) |
|
|
|
parking = forms.BooleanField(label='Парковка', required=False) |
|
|
|
press_centre = forms.BooleanField(label='Пресс-центр', required=False) |
|
|
|
press_centre = forms.BooleanField(label='Пресс-центр', required=False) |
|
|
|
mobile_application = forms.BooleanField(label='Мобильное приложение', required=False) |
|
|
|
mobile_application = forms.BooleanField(label='Мобильное приложение', required=False) |
|
|
|
@ -148,9 +148,10 @@ class ExpositionForm(forms.Form): |
|
|
|
place_exposition.country = Country.objects.get(id=data['country']) |
|
|
|
place_exposition.country = Country.objects.get(id=data['country']) |
|
|
|
if data.get('city'): |
|
|
|
if data.get('city'): |
|
|
|
place_exposition.city = City.objects.get(id=data['city']) |
|
|
|
place_exposition.city = City.objects.get(id=data['city']) |
|
|
|
|
|
|
|
a = place_exposition.logo |
|
|
|
fill_with_signal(PlaceExposition, place_exposition, data) |
|
|
|
|
|
|
|
place_exposition.save() |
|
|
|
place_exposition.save() |
|
|
|
|
|
|
|
fill_with_signal(PlaceExposition, place_exposition, data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return place_exposition |
|
|
|
return place_exposition |
|
|
|
|
|
|
|
|
|
|
|
|