aMerge branch 'develop' of git.general-servers.com:expomap/expomap into develop

remotes/origin/1203
pavel 11 years ago
commit c2fd3f8ffa
  1. 2
      .gitignore
  2. 4
      article/urls.py
  3. 5
      article/views.py
  4. 3
      conference/forms.py
  5. 62
      conference/urls.py
  6. 15
      conference/views.py
  7. 2
      exposition/models.py
  8. 60
      exposition/urls.py
  9. 27
      exposition/views.py
  10. 6
      import_xls/admin.py
  11. 3
      import_xls/admin_urls.py
  12. 12
      import_xls/export_forms.py
  13. 63
      meta/models.py
  14. 8
      meta/views.py
  15. 4
      proj/production.py
  16. 12
      proj/settings.py
  17. 1
      service/models.py
  18. 2
      templates/client/conference/catalog.html
  19. 2
      templates/client/conference/catalog_theme.html
  20. 2
      templates/client/conference/conference_list.html
  21. 3
      templates/client/exposition/catalog.html
  22. 3
      templates/client/exposition/catalog_theme.html
  23. 2
      templates/client/service/catalog.html
  24. 2
      templates/client/service/participation.html
  25. 2
      templates/client/service/remotely.html
  26. 2
      templates/client/service/tickets.html
  27. 2
      templates/client/service/tour.html
  28. 2
      templates/client/service/translator.html

2
.gitignore vendored

@ -11,5 +11,5 @@ Thumbs.db
npm-debug.log npm-debug.log
/proj/local.py /proj/local.py
atlassian-ide-plugin.xml

@ -7,6 +7,6 @@ urlpatterns = patterns('',
url(r'blogs/$', BlogList.as_view()), url(r'blogs/$', BlogList.as_view()),
url(r'news/page/(?P<page>\d+)/$', NewsList.as_view()), url(r'news/page/(?P<page>\d+)/$', NewsList.as_view()),
url(r'news/$', NewsList.as_view()), url(r'news/$', NewsList.as_view()),
url(r'blogs/(?P<slug>.*)/$', BlogDetail.as_view()), url(r'blogs/(?P<slug>.*)/$', BlogDetail.as_view(), {'meta_id':19}),
url(r'news/(?P<slug>.*)/$', NewsDetail.as_view()), url(r'news/(?P<slug>.*)/$', NewsDetail.as_view(), {'meta_id':19}),
) )

@ -4,6 +4,7 @@ from django.http import HttpResponse
from models import Article from models import Article
from forms import ArticleFilterForm from forms import ArticleFilterForm
from theme.models import Tag from theme.models import Tag
from meta.views import MetadataMixin
@ -51,7 +52,7 @@ class NewsList(ListView):
class NewsDetail(DetailView): class NewsDetail(MetadataMixin, DetailView):
model = Article model = Article
slug_field = 'slug' slug_field = 'slug'
template_name = 'article/news.html' template_name = 'article/news.html'
@ -102,7 +103,7 @@ class BlogList(ListView):
class BlogDetail(DetailView): class BlogDetail(MetadataMixin, DetailView):
model = Article model = Article
slug_field = 'slug' slug_field = 'slug'
template_name = 'article/article.html' template_name = 'article/article.html'

@ -193,7 +193,7 @@ class ConferenceCreateForm(forms.Form):
conference.save() conference.save()
return conference return conference
"""
def clean(self): def clean(self):
id = self.cleaned_data.get('conference_id') id = self.cleaned_data.get('conference_id')
name_ru = self.cleaned_data.get('name_ru') name_ru = self.cleaned_data.get('name_ru')
@ -205,6 +205,7 @@ class ConferenceCreateForm(forms.Form):
del self.cleaned_data['name_ru'] del self.cleaned_data['name_ru']
return self.cleaned_data return self.cleaned_data
"""
def clean_tag(self): def clean_tag(self):
tags = self.cleaned_data.get('tag') tags = self.cleaned_data.get('tag')

@ -15,39 +15,39 @@ urlpatterns = patterns('',
url(r'conference/search/', ExpositionSearchView.as_view()), url(r'conference/search/', ExpositionSearchView.as_view()),
# country catalog # country catalog
url(r'conference/country/$', ConferenceByCountry.as_view()), url(r'conference/country/$', ConferenceByCountry.as_view()),
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view()), url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':25}),
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view()), url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':24}),
url(r'conference/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view()), url(r'conference/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}),
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCountryCatalog.as_view()), url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':25}),
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCountryCatalog.as_view()), url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':24}),
url(r'conference/country/(?P<slug>.*)/$', ConferenceCountryCatalog.as_view()), url(r'conference/country/(?P<slug>.*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}),
# city catalog # city catalog
url(r'conference/city/$', ConferenceByCity.as_view()), url(r'conference/city/$', ConferenceByCity.as_view()),
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view()), url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':28}),
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view()), url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':27}),
url(r'conference/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view()), url(r'conference/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}),
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCityCatalog.as_view()), url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCityCatalog.as_view(), {'meta_id':28}),
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCityCatalog.as_view()), url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':27}),
url(r'conference/city/(?P<slug>.*)/$', ConferenceCityCatalog.as_view()), url(r'conference/city/(?P<slug>.*)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}),
# theme catalog # theme catalog
url(r'conference/theme/$', ConferenceByTheme.as_view()), url(r'conference/theme/$', ConferenceByTheme.as_view()),
url(r'conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ConferenceThemeCatalog.as_view()),
url(r'conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ConferenceThemeCatalog.as_view()),
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':31}),
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':30}),
url(r'conference/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':31}),
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':30}),
url(r'conference/theme/(?P<slug>.*)/$', ConferenceThemeCatalog.as_view()), url(r'conference/theme/(?P<slug>.*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
# tag catalog # tag catalog
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view()), url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':34}),
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view()), url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':33}),
url(r'conference/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view()), url(r'conference/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceTagCatalog.as_view()), url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceTagCatalog.as_view(), {'meta_id':34}),
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceTagCatalog.as_view()), url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':33}),
url(r'conference/tag/(?P<slug>.*)/$', ConferenceTagCatalog.as_view()), url(r'conference/tag/(?P<slug>.*)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
# conf additional pages # conf additional pages
url(r'conference/(?P<slug>.*)/visitors/page/(?P<page>\d+)/$', ConferenceVisitors.as_view()), url(r'conference/(?P<slug>.*)/visitors/page/(?P<page>\d+)/$', ConferenceVisitors.as_view()),
url(r'conference/(?P<slug>.*)/visitors/$', ConferenceVisitors.as_view()), url(r'conference/(?P<slug>.*)/visitors/$', ConferenceVisitors.as_view()),
@ -56,14 +56,14 @@ urlpatterns = patterns('',
url(r'conference/(?P<slug>.*)/service/(?P<service_url>.*)/', ConferenceServiceView.as_view()), url(r'conference/(?P<slug>.*)/service/(?P<service_url>.*)/', ConferenceServiceView.as_view()),
# conf list # conf list
url(r'conference/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceList.as_view()), url(r'conference/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':22}),
url(r'conference/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceList.as_view()), url(r'conference/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':21}),
url(r'conference/(?P<year>\d+)/(?P<month>.*)/$', ConferenceList.as_view()), url(r'conference/(?P<year>\d+)/(?P<month>.*)/$', ConferenceList.as_view(), {'meta_id':22}),
url(r'conference/(?P<year>\d+)/$', ConferenceList.as_view()), url(r'conference/(?P<year>\d+)/$', ConferenceList.as_view(), {'meta_id':21}),
url(r'conference/page/(?P<page>\d+)/$', ConferenceList.as_view()), url(r'conference/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':20}),
# conf page # conf page
url(r'conference/(?P<slug>.*)/$', ConferenceDetail.as_view()), url(r'conference/(?P<slug>.*)/$', ConferenceDetail.as_view(), {'meta_id':35}),
url(r'conference/$', ConferenceList.as_view()), url(r'conference/$', ConferenceList.as_view(), {'meta_id':20}),
) )

@ -18,6 +18,7 @@ from city.models import City
from theme.models import Theme, Tag from theme.models import Theme, Tag
from service.order_forms import AdvertiseForm from service.order_forms import AdvertiseForm
from functions.search_forms import ExpositionSearchForm from functions.search_forms import ExpositionSearchForm
from meta.views import MetadataMixin
MONTHES = settings.MONTHES MONTHES = settings.MONTHES
@ -75,7 +76,7 @@ class ConferenceByCity(ConferenceBy):
.order_by('translations__name').distinct() .order_by('translations__name').distinct()
class ConferenceCatalog(ListView): class ConferenceCatalog(MetadataMixin, ListView):
model = Conference model = Conference
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/conference/catalog.html' template_name = 'client/conference/catalog.html'
@ -145,6 +146,7 @@ class ConferenceCountryCatalog(ConferenceCatalog):
#this method used in parent get_queryset #this method used in parent get_queryset
slug = self.kwargs.get('slug') slug = self.kwargs.get('slug')
country = get_object_or_404(Country, url=slug) country = get_object_or_404(Country, url=slug)
self.kwargs['country'] = country
self.filter_object = country self.filter_object = country
qs = self.model.enable.filter(country=country) qs = self.model.enable.filter(country=country)
return qs return qs
@ -155,6 +157,7 @@ class ConferenceCityCatalog(ConferenceCatalog):
#this method used in parent get_queryset #this method used in parent get_queryset
slug = self.kwargs.get('slug') slug = self.kwargs.get('slug')
city = get_object_or_404(City, url=slug) city = get_object_or_404(City, url=slug)
self.kwargs['city'] = city
qs = self.model.enable.filter(city=city) qs = self.model.enable.filter(city=city)
self.filter_object = city self.filter_object = city
return qs return qs
@ -172,6 +175,7 @@ class ConferenceThemeCatalog(ConferenceCatalog):
country_slug = self.kwargs.get('country_slug') country_slug = self.kwargs.get('country_slug')
city_slug = self.kwargs.get('city_slug') city_slug = self.kwargs.get('city_slug')
theme = get_object_or_404(Theme, url=slug) theme = get_object_or_404(Theme, url=slug)
self.kwargs['theme'] = theme
qs = self.model.enable.filter(theme=theme) qs = self.model.enable.filter(theme=theme)
if country_slug: if country_slug:
@ -202,12 +206,13 @@ class ConferenceTagCatalog(ConferenceCatalog):
#this method used in parent get_queryset #this method used in parent get_queryset
slug = self.kwargs.get('slug') slug = self.kwargs.get('slug')
tag = get_object_or_404(Tag, url=slug) tag = get_object_or_404(Tag, url=slug)
self.kwargs['tag'] = tag
qs = self.model.enable.filter(tag=tag) qs = self.model.enable.filter(tag=tag)
self.filter_object = tag self.filter_object = tag
return qs return qs
class ConferenceVisitors(ListView): class ConferenceVisitors(MetadataMixin, ListView):
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
model = Conference model = Conference
#template_name = 'event_visitors.html' #template_name = 'event_visitors.html'
@ -230,7 +235,7 @@ class ConferenceVisitors(ListView):
return context return context
class ConferenceMembers(ListView): class ConferenceMembers(MetadataMixin, ListView):
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
model = Conference model = Conference
#template_name = 'event_visitors.html' #template_name = 'event_visitors.html'
@ -315,7 +320,7 @@ class ConferenceServiceView(FormMixin, DetailView):
class ConferenceDetail(DetailView): class ConferenceDetail(MetadataMixin, DetailView):
model = Conference model = Conference
slug_field = 'url' slug_field = 'url'
template_name = 'client/conference/conference_detail.html' template_name = 'client/conference/conference_detail.html'
@ -325,7 +330,7 @@ class ConferenceDetail(DetailView):
context['advertising_form'] = AdvertiseForm() context['advertising_form'] = AdvertiseForm()
return context return context
class ConferenceList(ListView): class ConferenceList(MetadataMixin, ListView):
model = Conference model = Conference
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/conference/conference_list.html' template_name = 'client/conference/conference_list.html'

@ -247,7 +247,7 @@ class Exposition(TranslatableModel, EventMixin, ExpoMixin):
if self.theme.all(): if self.theme.all():
theme = self.theme.all()[0] theme = self.theme.all()[0]
now = datetime.datetime.now() now = datetime.datetime.now()
now = now.replace(day=now.day-1) now = now - datetime.timedelta(days=1)
expositions = Exposition.objects.filter(theme__in=[theme], data_begin__gt=now).exclude(id=self.id).order_by('data_begin') expositions = Exposition.objects.filter(theme__in=[theme], data_begin__gt=now).exclude(id=self.id).order_by('data_begin')
return expositions[:3] return expositions[:3]
else: else:

@ -17,45 +17,43 @@ urlpatterns = patterns('',
# search # search
url(r'expo/search/', ExpositionSearchView.as_view()), url(r'expo/search/', ExpositionSearchView.as_view()),
# country catalog # country catalog
url(r'expo/country/$', ExpositionByCountry.as_view()), url(r'expo/country/$', ExpositionByCountry.as_view()),
url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view()), url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':7}),
url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view()), url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':6}),
url(r'expo/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view()), url(r'expo/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}),
url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoCountryCatalog.as_view()), url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoCountryCatalog.as_view(), {'meta_id':7}),
url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/$', ExpoCountryCatalog.as_view()), url(r'expo/country/(?P<slug>.*)/(?P<year>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':6}),
url(r'expo/country/(?P<slug>.*)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}), url(r'expo/country/(?P<slug>.*)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}),
# city catalog # city catalog
url(r'expo/city/$', ExpositionByCity.as_view()), url(r'expo/city/$', ExpositionByCity.as_view()),
url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view()), url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':10}),
url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view()), url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':9}),
url(r'expo/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view()), url(r'expo/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':8}),
url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoCityCatalog.as_view()), url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoCityCatalog.as_view(), {'meta_id':10}),
url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/$', ExpoCityCatalog.as_view()), url(r'expo/city/(?P<slug>.*)/(?P<year>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':9}),
url(r'expo/city/(?P<slug>.*)/$', ExpoCityCatalog.as_view()), url(r'expo/city/(?P<slug>.*)/$', ExpoCityCatalog.as_view(), {'meta_id':8}),
# theme catalog # theme catalog
url(r'expo/theme/$', ExpositionByTheme.as_view()), url(r'expo/theme/$', ExpositionByTheme.as_view()),
url(r'expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'expo/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'expo/theme/(?P<slug>.*)/$', ExpoThemeCatalog.as_view()), url(r'expo/theme/(?P<slug>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
# tag catalog # tag catalog
url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view()), url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':17}),
url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view()), url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':15}),
url(r'expo/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view()), url(r'expo/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoTagCatalog.as_view()), url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoTagCatalog.as_view(), {'meta_id':17}),
url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/$', ExpoTagCatalog.as_view()), url(r'expo/tag/(?P<slug>.*)/(?P<year>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':15}),
url(r'expo/tag/(?P<slug>.*)/$', ExpoTagCatalog.as_view()), url(r'expo/tag/(?P<slug>.*)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
# expo additional pages # expo additional pages
url(r'expo/(?P<slug>.*)/statistic/$', ExpositionStatistic.as_view()), url(r'expo/(?P<slug>.*)/statistic/$', ExpositionStatistic.as_view()),
url(r'expo/(?P<slug>.*)/price/$', ExpositionPrice.as_view()), url(r'expo/(?P<slug>.*)/price/$', ExpositionPrice.as_view()),
@ -73,7 +71,7 @@ urlpatterns = patterns('',
url(r'expo/(?P<year>\d+)/$', ExpoList.as_view(), {'meta_id':3}), url(r'expo/(?P<year>\d+)/$', ExpoList.as_view(), {'meta_id':3}),
url(r'expo/page/(?P<page>\d+)/$', ExpoList.as_view(), {'meta_id':2}), url(r'expo/page/(?P<page>\d+)/$', ExpoList.as_view(), {'meta_id':2}),
# expo page # expo page
url(r'expo/(?P<slug>.*)/$', ExpoDetail.as_view()),# event url(r'expo/(?P<slug>.*)/$', ExpoDetail.as_view(), {'meta_id':18}),# event
url(r'expo/$', ExpoList.as_view(), {'meta_id':2}), url(r'expo/$', ExpoList.as_view(), {'meta_id':2}),

@ -128,7 +128,7 @@ def exposition_visit(request, id):
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
class ExpoDetail(DetailView): class ExpoDetail(MetadataMixin, DetailView):
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
template_name = 'client/exposition/exposition_detail.html' template_name = 'client/exposition/exposition_detail.html'
@ -157,11 +157,18 @@ class ExpositionStatistic(DetailView):
template_name = 'client/exposition/statistic.html' template_name = 'client/exposition/statistic.html'
from django.views.generic.edit import FormMixin, ModelFormMixin from django.views.generic.edit import FormMixin, ModelFormMixin
class ExpositionServiceView(FormMixin, DetailView): class ExpositionServiceView(MetadataMixin, FormMixin, DetailView):
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
service = None service = None
def dispatch(self, request, *args, **kwargs):
service_url = self.kwargs.get('service_url')
service = get_object_or_404(Service, url=service_url)
self.service = service
self.template_name = service.template
return super(ExpositionServiceView, self).dispatch(request, *args, **kwargs)
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
self.object = self.get_object() self.object = self.get_object()
service_url = self.kwargs.get('service_url') service_url = self.kwargs.get('service_url')
@ -176,17 +183,16 @@ class ExpositionServiceView(FormMixin, DetailView):
return self.form_invalid(form) return self.form_invalid(form)
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
kwargs.update({'meta_id': getattr(self.service, 'meta_id','')})
context = super(ExpositionServiceView, self).get_context_data(**kwargs) context = super(ExpositionServiceView, self).get_context_data(**kwargs)
service_url = self.kwargs.get('service_url') service_url = self.kwargs.get('service_url')
service = get_object_or_404(Service, url=service_url)
self.service = service
self.template_name = service.template
form = order_forms.get(service_url) form = order_forms.get(service_url)
self.form_class = form self.form_class = form
if not form: if not form:
raise Http404 raise Http404
context['form'] = self.get_form(self.form_class) context['form'] = self.get_form(self.form_class)
context['service'] = service context['service'] = self.service
context['object'] = self.get_object() context['object'] = self.get_object()
return context return context
@ -257,7 +263,7 @@ class ExpoList(MetadataMixin, ListView):
MONTHES = settings.MONTHES MONTHES = settings.MONTHES
class ExpoCatalog(ListView): class ExpoCatalog(MetadataMixin, ListView):
model = Exposition model = Exposition
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'exposition/catalog.html' template_name = 'exposition/catalog.html'
@ -321,7 +327,7 @@ class ExpoCatalog(ListView):
context['catalog_url'] = self.catalog_url context['catalog_url'] = self.catalog_url
return context return context
class ExpoCountryCatalog(MetadataMixin, ExpoCatalog): class ExpoCountryCatalog(ExpoCatalog):
catalog_url = '/expo/country/' catalog_url = '/expo/country/'
def get_filtered_qs(self): def get_filtered_qs(self):
#this method used in parent get_queryset #this method used in parent get_queryset
@ -338,6 +344,7 @@ class ExpoCityCatalog(ExpoCatalog):
#this method used in parent get_queryset #this method used in parent get_queryset
slug = self.kwargs.get('slug') slug = self.kwargs.get('slug')
city = get_object_or_404(City, url=slug) city = get_object_or_404(City, url=slug)
self.kwargs['city'] = city
qs = self.model.enable.filter(city=city) qs = self.model.enable.filter(city=city)
self.filter_object = city self.filter_object = city
return qs return qs
@ -355,16 +362,19 @@ class ExpoThemeCatalog(ExpoCatalog):
country_slug = self.kwargs.get('country_slug') country_slug = self.kwargs.get('country_slug')
city_slug = self.kwargs.get('city_slug') city_slug = self.kwargs.get('city_slug')
theme = get_object_or_404(Theme, url=slug) theme = get_object_or_404(Theme, url=slug)
self.kwargs['theme'] = theme
qs = self.model.enable.filter(theme=theme) qs = self.model.enable.filter(theme=theme)
if country_slug: if country_slug:
country = get_object_or_404(Country, url=country_slug) country = get_object_or_404(Country, url=country_slug)
self.country = country self.country = country
self.kwargs['country'] = country
qs = qs.filter(country=country) qs = qs.filter(country=country)
if city_slug: if city_slug:
city = get_object_or_404(City, url=city_slug) city = get_object_or_404(City, url=city_slug)
self.city = city self.city = city
self.kwargs['city'] = city
qs = qs.filter(city=city) qs = qs.filter(city=city)
self.filter_object = theme self.filter_object = theme
@ -385,6 +395,7 @@ class ExpoTagCatalog(ExpoCatalog):
#this method used in parent get_queryset #this method used in parent get_queryset
slug = self.kwargs.get('slug') slug = self.kwargs.get('slug')
tag = get_object_or_404(Tag, url=slug) tag = get_object_or_404(Tag, url=slug)
self.kwargs['tag'] = tag
qs = self.model.enable.filter(tag=tag) qs = self.model.enable.filter(tag=tag)
self.filter_object = tag self.filter_object = tag
return qs return qs

@ -11,7 +11,7 @@ import xlrd
from import_forms import ImportEventForm, ImportThemeForm, ImportTagForm, ImportOrganiserForm,\ from import_forms import ImportEventForm, ImportThemeForm, ImportTagForm, ImportOrganiserForm,\
ImportPlaceConferenceForm, ImportPlaceExpositionForm ImportPlaceConferenceForm, ImportPlaceExpositionForm
from export_forms import ExportEventForm, ExportOrganiserForm, ExportThemeForm, ExportTagForm,\ from export_forms import ExportEventForm, ExportOrganiserForm, ExportThemeForm, ExportTagForm,\
ExportUserForm, ExportCompanyForm, ExportPlaceConferenceForm, ExportPlaceExpositionForm ExportUserForm, ExportCompanyForm, ExportPlaceConferenceForm, ExportPlaceExpositionForm, ExportBlogForm
from django.views.generic import FormView from django.views.generic import FormView
from django.contrib import messages from django.contrib import messages
@ -78,6 +78,10 @@ class ExportPlaceExposition(ExportView):
form_class = ExportPlaceExpositionForm form_class = ExportPlaceExpositionForm
success_url = '/admin/export-place_exposition' success_url = '/admin/export-place_exposition'
class ExportBlog(ExportView):
form_class = ExportBlogForm
success_url = '/admin/export-blog/'
from exposition.models import Exposition from exposition.models import Exposition

@ -3,7 +3,7 @@ from django.conf.urls import patterns, url
from admin import ImportTheme, ImportEvent, ImportOrganiser, ImportTag, ImportPlaceExposition, ImportPlaceConference from admin import ImportTheme, ImportEvent, ImportOrganiser, ImportTag, ImportPlaceExposition, ImportPlaceConference
from admin import ExportTheme, ExportEvent, ExportOrganiser, ExportTag, ExportPlaceExposition,\ from admin import ExportTheme, ExportEvent, ExportOrganiser, ExportTag, ExportPlaceExposition,\
ExportPlaceConference, ExportCompany, ExportUser ExportPlaceConference, ExportCompany, ExportUser, ExportBlog
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^import-event/$', ImportEvent.as_view()), url(r'^import-event/$', ImportEvent.as_view()),
@ -21,5 +21,6 @@ urlpatterns = patterns('',
url(r'^export-place_conference/$', ExportPlaceConference.as_view()), url(r'^export-place_conference/$', ExportPlaceConference.as_view()),
url(r'^export-user/$', ExportUser.as_view()), url(r'^export-user/$', ExportUser.as_view()),
url(r'^export-company/$', ExportCompany.as_view()), url(r'^export-company/$', ExportCompany.as_view()),
url(r'^export-blog/$', ExportBlog.as_view()),
) )

@ -1,11 +1,13 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django import forms from django import forms
from django.conf import settings from django.conf import settings
from django.utils import translation
from theme.models import Theme, Tag from theme.models import Theme, Tag
from country.models import Country from country.models import Country
from organiser.models import Organiser from organiser.models import Organiser
from accounts.models import User from accounts.models import User
from company.models import Company from company.models import Company
from article.models import Article
from place_exposition.models import PlaceExposition from place_exposition.models import PlaceExposition
from place_conference.models import PlaceConference from place_conference.models import PlaceConference
from django.db.models.loading import get_model from django.db.models.loading import get_model
@ -149,6 +151,16 @@ class ExportCompanyForm(ExportForm):
def get_fname(self): def get_fname(self):
return 'companies.xls' return 'companies.xls'
class ExportBlogForm(ExportForm):
model = Article
def get_fname(self):
return 'blogs.xls'
def get_objects(self, data):
translation.activate(data['language'])
return self.model.objects.blogs()
class ExportEventForm(forms.Form): class ExportEventForm(forms.Form):

@ -7,6 +7,39 @@ from hvad.models import TranslatableModel, TranslatedFields, TranslationManager
from pymorphy.django_conf import default_morph as morph from pymorphy.django_conf import default_morph as morph
from functions.signal_handlers import post_save_handler from functions.signal_handlers import post_save_handler
# additional funcs
MONTHES = {'jan': _(u'январе'), 'feb': _(u'феврале'), 'mar': _(u'марте'), 'apr': _(u'апреле'),
'may': _(u'мае'), 'jun': _(u'июне'), u'jul': _(u'июле'), 'aug': _(u'августе'),
'sep': _(u'сентябре'), 'oct': _(u'октябре'), 'nov': _(u'ноябре'), 'dec': _(u'декабре'),}
def get_month_inflect(value, key):
return {key: MONTHES.get(value, '') }
def get_obj_inflect(obj, key):
if translation.get_language() == 'ru':
result = {key: getattr(obj, 'inflect', '')}
else:
result = {key: getattr(obj, 'name', '')}
return result
def get_theme_inflect(obj, key):
if translation.get_language() == 'ru':
result = {'theme_inflect': getattr(obj, 'inflect', ''),
'theme_name': getattr(obj, 'name', '')}
else:
result = {'theme_inflect': getattr(obj, 'name', ''),
'theme_name': getattr(obj, 'name', '')}
return result
def get_tag_inflect(obj, key):
if translation.get_language() == 'ru':
result = {'tag_inflect': getattr(obj, 'inflect', ''),
'tag_name': getattr(obj, 'name', '')}
else:
result = {'tag_inflect': getattr(obj, 'name', ''),
'tag_name': getattr(obj, 'name', '')}
return result
class MetaSetting(TranslatableModel): class MetaSetting(TranslatableModel):
name = models.CharField(max_length=100, unique=True) name = models.CharField(max_length=100, unique=True)
translations = TranslatedFields( translations = TranslatedFields(
@ -16,36 +49,34 @@ class MetaSetting(TranslatableModel):
h1 = models.CharField(max_length=255, blank=True), h1 = models.CharField(max_length=255, blank=True),
) )
object_params = {'EXPONAME':{'name': 'name'}, object_params = {'object_name': 'name', 'object_title': 'main_title'}
'EXPONAME_YA':{'name': 'name', 'inflect': True},
'EXPOCOUNTRY':{'name': 'country'}, params = {'month': get_month_inflect, 'country': get_obj_inflect, 'city': get_obj_inflect,
'EXPOCOUNTRY_YA':{'name': 'country', 'inflect': True}, 'theme': get_theme_inflect, 'tag': get_tag_inflect}
'EXPOPLACE':{'name': 'place'},
'EXPOCITY':{'name': 'city'},
'EXPOTHEME':{'name': 'theme'},
'EXPOTAG':{'name': 'tag'},
'EXPOMONTH':{'name': 'month'},
'EXPOYEAR':{'name': 'year'},
}
params = {}
monthes = {'jan': _(u'январе'), 'feb': _(u'феврале'), 'mar': _(u'марте'), 'apr': _(u'апреле'), monthes = {'jan': _(u'январе'), 'feb': _(u'феврале'), 'mar': _(u'марте'), 'apr': _(u'апреле'),
'may': _(u'мае'), 'jun': _(u'июне'), u'jul': _(u'июле'), 'aug': _(u'августе'), 'may': _(u'мае'), 'jun': _(u'июне'), u'jul': _(u'июле'), 'aug': _(u'августе'),
'sep': _(u'сентябре'), 'oct': _(u'октябре'), 'nov': _(u'ноябре'), 'dec': _(u'декабре'),} 'sep': _(u'сентябре'), 'oct': _(u'октябре'), 'nov': _(u'ноябре'), 'dec': _(u'декабре'),}
def __unicode__(self): def __unicode__(self):
return self.name return self.name
def generate_meta(self, params, obj=None): def generate_meta(self, params, obj=None):
""" """
obj must be in current language obj must be in current language
""" """
lang = translation.get_language() lang = translation.get_language()
updates = {}
if obj: if obj:
params.update({'EXPONAME': getattr(obj, 'name', '')}) for key, value in self.object_params.iteritems():
updates.update({key: getattr(obj, value, '')})
if params.get('month'): for key, value in params.iteritems():
month = params['month'] if key in self.params:
params['month'] = self.monthes[month] updates.update(self.params[key](value, key))
params.update(updates)
tr = self.translations.get(language_code=lang) tr = self.translations.get(language_code=lang)
title = tr.title.format(**params) title = tr.title.format(**params)

@ -155,13 +155,19 @@ class MetadataMixin(object):
context = super(MetadataMixin, self).get_context_data(**kwargs) context = super(MetadataMixin, self).get_context_data(**kwargs)
meta_id = self.kwargs.get('meta_id') meta_id = self.kwargs.get('meta_id')
if not meta_id:
meta_id = kwargs.get('meta_id')
if meta_id: if meta_id:
try: try:
meta_set = MetaSetting.objects.get(id=meta_id) meta_set = MetaSetting.objects.get(id=meta_id)
except MetaSetting.DoesNotExist: except MetaSetting.DoesNotExist:
return context return context
params = dict(self.kwargs) params = dict(self.kwargs)
data = meta_set.generate_meta(params) if getattr(self, 'object', None):
data = meta_set.generate_meta(params, self.object)
else:
data = meta_set.generate_meta(params)
self.title = data.get('title') self.title = data.get('title')
self.h1 = data.get('h1') self.h1 = data.get('h1')

@ -1,6 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Django local settings # Django local settings
DEBUG = True # изменить когда будет продакшн DEBUG = False
ALLOWED_HOSTS = ['hit.expomap.ru', '195.66.79.152', '195.66.79.145', 'expomap.ru']
DATABASES = { DATABASES = {
'default': { 'default': {

@ -385,12 +385,7 @@ CALLBACK_EMAIL = 'kotzilla@ukr.net'
BOOKING_AID = '333667' BOOKING_AID = '333667'
"""
try:
from local import *
except ImportError, e:
from production import *
"""
ADMIN_PAGINATION = 20 ADMIN_PAGINATION = 20
CLIENT_PAGINATION = 15 CLIENT_PAGINATION = 15
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
@ -407,3 +402,8 @@ MONTHES = {'jan': {'value': 1, 'name': _(u'Январь')}, 'feb': {'value': 2,
'jul': {'value': 7, 'name': _(u'Июль')}, 'aug': {'value': 8, 'name': _(u'Август')}, 'jul': {'value': 7, 'name': _(u'Июль')}, 'aug': {'value': 8, 'name': _(u'Август')},
'sep': {'value': 9, 'name': _(u'Сентябрь')}, 'oct': {'value': 10, 'name': _(u'Октябрь')}, 'sep': {'value': 9, 'name': _(u'Сентябрь')}, 'oct': {'value': 10, 'name': _(u'Октябрь')},
'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}} 'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}}
try:
from local import *
except ImportError, e:
pass

@ -31,6 +31,7 @@ class Service(TranslatableModel):
) )
sort = models.PositiveIntegerField(default=0, db_index=True) sort = models.PositiveIntegerField(default=0, db_index=True)
main_page = models.PositiveIntegerField(default=0, db_index=True) main_page = models.PositiveIntegerField(default=0, db_index=True)
meta_id = models.IntegerField(null=True)
def __unicode__(self): def __unicode__(self):

@ -24,7 +24,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong></h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1>
</div> </div>
{% include 'includes/exposition/catalog_filter_period.html' %} {% include 'includes/exposition/catalog_filter_period.html' %}

@ -49,7 +49,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong></h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1>
</div> </div>
{% include 'includes/exposition/catalog_filter_period.html' %} {% include 'includes/exposition/catalog_filter_period.html' %}

@ -23,7 +23,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Конференции' %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Конференции' %}{% endif %}</h1>
</div> </div>
{% include 'includes/exposition/catalog_filter_period.html' %} {% include 'includes/exposition/catalog_filter_period.html' %}

@ -24,7 +24,8 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Выставки' %}: <strong>{{ filter_object.name }}</strong></h1> {# <h1>{% trans 'Выставки' %}: <strong>{{ filter_object.name }}</strong></h1> #}
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Выставки' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1>
</div> </div>
{% include 'includes/exposition/catalog_filter_period.html' %} {% include 'includes/exposition/catalog_filter_period.html' %}

@ -49,7 +49,8 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Выставки' %}: <strong>{{ filter_object.name }}</strong></h1> {# <h1>{% trans 'Выставки' %}: <strong>{{ filter_object.name }}</strong></h1> #}
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Выставки' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1>
</div> </div>
{% include 'includes/exposition/catalog_filter_period.html' %} {% include 'includes/exposition/catalog_filter_period.html' %}

@ -22,7 +22,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Официальный каталог выставки' %}{% if object %} {{ object.name }} {% endif %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Официальный каталог выставки' %}{% if object %} {{ object.name }} {% endif %}{% endif %}</h1>
</div> </div>
{% endblock %} {% endblock %}

@ -21,7 +21,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Участие в выставке' %}{% if object %} {{ object.name }} {% endif %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Участие в выставке' %}{% if object %} {{ object.name }} {% endif %}{% endif %}</h1>
</div> </div>
{% endblock %} {% endblock %}

@ -23,7 +23,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Заочное посещение выставки' %}{% if object %} {{ object.name }} {% endif %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Заочное посещение выставки' %}{% if object %} {{ object.name }} {% endif %}{% endif %}</h1>
</div> </div>
{% endblock %} {% endblock %}

@ -22,7 +22,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Билеты на выставку' %}{% if object %} {{ object.name }} {% endif %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Билеты на выставку' %}{% if object %} {{ object.name }} {% endif %}{% endif %}</h1>
</div> </div>
{% endblock %} {% endblock %}

@ -22,7 +22,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Посещение выставки' %} {% if object %}{{ object.name }}{% endif %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Посещение выставки' %} {% if object %}{{ object.name }}{% endif %}{% endif %}</h1>
</div> </div>
{% endblock %} {% endblock %}

@ -23,7 +23,7 @@
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{% trans 'Услуги переводчика' %}{% if object %} {% trans 'на' %} {{ object.name }} {% endif %}</h1> <h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Услуги переводчика' %}{% if object %} {% trans 'на' %} {{ object.name }} {% endif %}{% endif %}</h1>
</div> </div>
{% endblock %} {% endblock %}

Loading…
Cancel
Save