diff --git a/apps/conference/forms.py b/apps/conference/forms.py index e647c33e..8d034de4 100644 --- a/apps/conference/forms.py +++ b/apps/conference/forms.py @@ -56,7 +56,7 @@ class ConferenceCreateForm(forms.Form): #organiser = forms.MultipleChoiceField(label=u'Организаторы', required=False, # choices=[(item.id, item.name) for item in Organiser.objects.language().all()]) org = forms.CharField(required=False, label=_(u'Организатор')) - country = forms.ChoiceField(label=_(u'Страна'), choices=[(c.id, c.name) for c in Country.objects.language().all()]) + country = forms.ChoiceField(label=_(u'Страна'), choices=list(set([(c.id, c.name) for c in Country.objects.language().all()]))) theme = forms.MultipleChoiceField(label=_(u'Тематики'), choices=[(item.id, item.name) for item in Theme.objects.language().all()]) diff --git a/apps/exposition/forms.py b/apps/exposition/forms.py index 05172454..ed495358 100644 --- a/apps/exposition/forms.py +++ b/apps/exposition/forms.py @@ -49,7 +49,7 @@ class ExpositionCreateForm(forms.Form): #company = forms.MultipleChoiceField(label=u'Компании', required=False, # choices=[(item.id, item.name) for item in Company.objects.language().all()] ) - country = forms.ChoiceField(label=_(u'Страна'), choices=[(c.id, c.name) for c in Country.objects.language().all()]) + country = forms.ChoiceField(label=_(u'Страна'), choices=list(set([(c.id, c.name) for c in Country.objects.language().all()]))) theme = forms.MultipleChoiceField( label=_(u'Тематики'), choices=[(item.id, item.name) for item in Theme.objects.language().filter(types=Theme.types.exposition)]) diff --git a/apps/place_exposition/forms.py b/apps/place_exposition/forms.py index aca9867d..ce0f721a 100644 --- a/apps/place_exposition/forms.py +++ b/apps/place_exposition/forms.py @@ -30,7 +30,7 @@ class ExpositionForm(forms.Form): type = forms.ChoiceField(required=False, choices=types) logo = forms.ImageField(label=_(u'Logo'), required=False, max_length=500) - country = forms.ChoiceField(label=_(u'Страна'), choices=[(c.id, c.name) for c in Country.objects.language().all()]) + country = forms.ChoiceField(label=_(u'Страна'), choices=list(set([(c.id, c.name) for c in Country.objects.language().all()]))) # creates select input with empty choices cause it will be filled with ajax city = forms.CharField(label=_(u'Город'), widget=forms.HiddenInput()) diff --git a/proj/admin.py b/proj/admin.py index 2f83ba63..aaf121a5 100644 --- a/proj/admin.py +++ b/proj/admin.py @@ -26,7 +26,7 @@ def ajax_city(request): returns html