|
|
|
|
@ -36,7 +36,7 @@ from stats_collector.mixin import ( |
|
|
|
|
ObjectStatMixin |
|
|
|
|
) |
|
|
|
|
from theme.models import Tag, Theme |
|
|
|
|
from events.mixin import ExpoFilterMixin |
|
|
|
|
from events.mixin import ExpoFilterMixin, SearchFilterMixin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ExpositionBy(ExpoFilterMixin, ExpoSectionMixin, JitterCacheMixin, MetadataMixin, ListView): |
|
|
|
|
@ -114,7 +114,7 @@ class ExpositionByCity(ExpositionBy): |
|
|
|
|
# .order_by('translations__name').distinct() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ExpositionSearchView(ExpoFilterMixin, ExpoSearchView): |
|
|
|
|
class ExpositionSearchView(SearchFilterMixin, ExpoSearchView): |
|
|
|
|
#paginate_by = 10 |
|
|
|
|
template_name = 'client/exposition/search.html' |
|
|
|
|
search_form = ExpositionSearchForm |
|
|
|
|
@ -448,7 +448,7 @@ class ExpoCountryCatalog(ExpoCatalog): |
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
|
context = super(ExpoCountryCatalog, self).get_context_data(**kwargs) |
|
|
|
|
context['country'] = str(self.kwargs['country'].id) |
|
|
|
|
context['country'] = [str(self.kwargs['country'].id)] |
|
|
|
|
return context |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -467,8 +467,8 @@ class ExpoCityCatalog(ExpoCatalog): |
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
|
context = super(ExpoCityCatalog, self).get_context_data(**kwargs) |
|
|
|
|
city = self.kwargs['city'] |
|
|
|
|
context['country'] = str(city.country_id) |
|
|
|
|
context['city'] = str(city.id) |
|
|
|
|
context['country'] = [str(city.country_id)] |
|
|
|
|
context['city'] = [str(city.id)] |
|
|
|
|
return context |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -532,7 +532,7 @@ class ExpoTagCatalog(ExpoCatalog): |
|
|
|
|
tag = self.kwargs['tag'] |
|
|
|
|
context['theme_for_filter'] = tag.theme |
|
|
|
|
context['themes'] = [str(tag.theme.id)] |
|
|
|
|
context['tag'] = str(self.kwargs['tag'].id) |
|
|
|
|
context['tag'] = [str(self.kwargs['tag'].id)] |
|
|
|
|
return context |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|