From 693b14292c1799d97be0a9afd4af40f4e3a7e998 Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Sat, 13 Aug 2016 16:05:57 +0300 Subject: [PATCH] =?UTF-8?q?1458:=20=D0=AD=D1=82=D0=B0=D0=BF=20=E2=84=965:?= =?UTF-8?q?=20=D0=94=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D0=BE=20-=20=D1=83=D1=81=D0=BB=D1=83=D0=B3=D0=B0?= =?UTF-8?q?=20"=D0=91=D0=B8=D0=BB=D0=B5=D1=82=D1=8B"=208.=20=D0=94=D0=BE?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=20-=20=D1=83=D1=81=D0=BB=D1=83=D0=B3=D0=B0=20"=D0=91?= =?UTF-8?q?=D0=B8=D0=BB=D0=B5=D1=82=D1=8B"=20=D0=B4=D0=BE=D0=BF=D1=8B=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D0=B4=D0=B0=D1=87=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exposition/models.py | 4 ++ functions/model_mixin.py | 4 +- templates/client/includes/event_steps.html | 6 +- .../client/includes/exposition/price.html | 2 +- templates/client/service/tickets.html | 62 ++++++++++++++----- 5 files changed, 58 insertions(+), 20 deletions(-) diff --git a/exposition/models.py b/exposition/models.py index 1ccab6e8..c13d80d2 100644 --- a/exposition/models.py +++ b/exposition/models.py @@ -181,6 +181,10 @@ class Exposition(TranslatableModel, EventMixin, ExpoMixin): def __unicode__(self): return self.lazy_translation_getter('name', unicode(self.pk)) + @property + def get_price(self): + return self.price_day or self.price_all + def get_services(self): return self.get_services_detail() # country_ids = [item for item, bool in self.country.services if bool==True] diff --git a/functions/model_mixin.py b/functions/model_mixin.py index 95acc167..3102881b 100644 --- a/functions/model_mixin.py +++ b/functions/model_mixin.py @@ -101,9 +101,9 @@ class EventMixin(object): # qs = qs.filter(Q(Q(url__in=country_ids) & Q(type=_type)) | Q(url__in=ids)) qs = qs.filter(url__in=services) self._get_services_detail = list(qs) - + # import pdb; pdb.set_trace() #двигаем билеты сразу за переводом - if 'tickets' not in excluded: + if excluded is None or 'tickets' not in excluded: translator_idx = tickets = None for idx, service in enumerate(self._get_services_detail): if service.url == 'translator': diff --git a/templates/client/includes/event_steps.html b/templates/client/includes/event_steps.html index c55714a7..fa0d6f2b 100644 --- a/templates/client/includes/event_steps.html +++ b/templates/client/includes/event_steps.html @@ -5,11 +5,15 @@