diff --git a/conference/views.py b/conference/views.py index 83ffa8a0..d89d3437 100644 --- a/conference/views.py +++ b/conference/views.py @@ -375,7 +375,7 @@ class ConferenceServiceView(FormMixin, DetailView): return self.initial.copy() -class ConferenceDetail(JitterCacheMixin, DetailView): +class ConferenceDetail(JitterCacheMixin, MetadataMixin, DetailView): cache_range = settings.CACHE_RANGE model = Conference slug_field = 'url' diff --git a/emencia/django/newsletter/views/admin_views.py b/emencia/django/newsletter/views/admin_views.py index 830a7230..c50e854d 100644 --- a/emencia/django/newsletter/views/admin_views.py +++ b/emencia/django/newsletter/views/admin_views.py @@ -159,7 +159,7 @@ class UpdateMailingList(UpdateView): if themes: obj.subscribers.add(*list(Contact.objects.filter(contactsettings__theme__in=themes).distinct())) - return HttpResponseRedirect(self.success_url) + return HttpResponseRedirect(self.success_url) class CreateMailingList(CreateView): diff --git a/meta/models.py b/meta/models.py index 050c6799..7d167c34 100644 --- a/meta/models.py +++ b/meta/models.py @@ -92,12 +92,18 @@ class MetaSetting(TranslatableModel): if key in self.params: updates.update(self.params[key](value, key)) params.update(updates) + # current translation object tr = self.translations.get(language_code=lang) - title = tr.title.format(**params) - description = tr.description.format(**params) - keywords = []#tr.keywords.format(**params) uncoment if keywords need - h1 = tr.h1.format(**params) + title, description, h1 = '', '', '' + keywords = [] #tr.keywords.format(**params) uncoment if keywords need + + try: + title = tr.title.format(**params) + description = tr.description.format(**params) + h1 = tr.h1.format(**params) + except: + pass return {'title': title, 'description': description, 'keywords': keywords, 'h1': h1} diff --git a/proj/urls.py b/proj/urls.py index bd2e90cb..dd4d976c 100644 --- a/proj/urls.py +++ b/proj/urls.py @@ -36,7 +36,7 @@ urlpatterns = patterns('', url(r'^sitemap\.xml$', views.index, {'sitemaps': sitemaps}), url(r'^sitemap-(?P
.+)\.xml$', views.sitemap, {'sitemaps': sitemaps}), url(r'^robots.txt$', Robot.as_view()), - url(r'^yandex_4c326c16c916403e.html$', YandexCheck.as_view()), + url(r'^yandex_4c45d77eb3f781f8.html$', YandexCheck.as_view()), url(r'^$', MainPageView.as_view()), url(r'^page/', include('core.simple_urls')), url(r'^theme/', include('theme.urls')), diff --git a/templates/client/accounts/translators/translator_city.html b/templates/client/accounts/translators/translator_city.html index 3f946b4f..78396929 100644 --- a/templates/client/accounts/translators/translator_city.html +++ b/templates/client/accounts/translators/translator_city.html @@ -27,7 +27,7 @@
-
{{ object.name }}
+

{{ object.name }}

@@ -73,7 +73,7 @@
- +

{% trans 'Наши специалисты' %}

diff --git a/templates/client/accounts/translators/translator_country.html b/templates/client/accounts/translators/translator_country.html index e4c58f09..a7f72a4d 100644 --- a/templates/client/accounts/translators/translator_country.html +++ b/templates/client/accounts/translators/translator_country.html @@ -24,7 +24,7 @@
-
{% trans 'Переводчики' %} {{ object.inflect }}
+

{% trans 'Переводчики' %} {{ object.inflect }}

@@ -108,7 +108,7 @@
- +

{% trans 'Наши специалисты' %}

diff --git a/templates/client/accounts/user_events.html b/templates/client/accounts/user_events.html index 6d481bd3..0bcfade7 100644 --- a/templates/client/accounts/user_events.html +++ b/templates/client/accounts/user_events.html @@ -12,9 +12,10 @@ {% endblock %} {% block page_title %} -
-

{{ event_type }}

-
+
+

{% if meta %}{{ meta.h1 }}{% else %}{{ event_type }}{% endif %}

+
+ {% endblock %} {% block content_list %} diff --git a/templates/client/base_catalog.html b/templates/client/base_catalog.html index 8bedcc02..c7efee4a 100644 --- a/templates/client/base_catalog.html +++ b/templates/client/base_catalog.html @@ -10,11 +10,12 @@