Master commit

remotes/origin/1203
Kotiuk Nazarii 11 years ago
parent a69201edcd
commit 0319e0d9da
  1. 2
      functions/search_forms.py
  2. 4
      functions/search_mixin.py

@ -171,7 +171,9 @@ class AbstactSearchForm(forms.Form):
if not self.is_valid(): if not self.is_valid():
return EmptySearchQuerySet() return EmptySearchQuerySet()
q = self.cleaned_data.get('q') q = self.cleaned_data.get('q')
q = q.strip()
w = self.cleaned_data.get('w') w = self.cleaned_data.get('w')
w = w.strip()
fr = self.cleaned_data.get('fr') fr = self.cleaned_data.get('fr')
to = self.cleaned_data.get('to') to = self.cleaned_data.get('to')
th = self.cleaned_data.get('th') th = self.cleaned_data.get('th')

@ -10,11 +10,11 @@ class ExpoSearchMixin(object):
if obj.country: if obj.country:
country = [tr.name for tr in obj.country.translations.all()] country = [tr.name for tr in obj.country.translations.all()]
else: else:
country = '' country = []
if obj.city: if obj.city:
city = [tr.name for tr in obj.city.translations.all()] city = [tr.name for tr in obj.city.translations.all()]
else: else:
city = '' city = []
return country + city return country + city

Loading…
Cancel
Save