From aea53b2da901e132d30ab201efcdf75823cd9794 Mon Sep 17 00:00:00 2001 From: Nazar Kotjuk Date: Mon, 23 Nov 2015 13:47:51 +0200 Subject: [PATCH 1/2] fix --- emencia/django/newsletter/views/admin_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): From a5c730d5535fb17977084a6af87044e306b28d3e Mon Sep 17 00:00:00 2001 From: Nazarii Kotiuk Date: Wed, 13 Jan 2016 00:07:33 +0200 Subject: [PATCH 2/2] Fixes on frontend from production --- conference/views.py | 2 +- meta/models.py | 14 +- proj/urls.py | 2 +- .../accounts/translators/translator_city.html | 4 +- .../translators/translator_country.html | 4 +- templates/client/accounts/user_events.html | 7 +- templates/client/base_catalog.html | 5 +- templates/client/base_page.html | 202 ++-- templates/client/city/city.html | 6 +- templates/client/country/country.html | 8 +- .../client/exposition/exposition_list.html | 8 +- templates/client/exposition/visitors.html | 3 + .../includes/accounts/current_user.html | 2 +- .../client/includes/accounts/simple_user.html | 2 +- .../includes/article.back/article_logo.html | 10 + .../article.back/article_on_main_preview.html | 11 + .../article.back/article_preview.html | 12 + .../includes/article.back/blog_list.html | 23 + .../article.back/catalog_filter_period.html | 19 + .../includes/article.back/news_list.html | 22 + .../article.back/news_logo_in_catalog.html | 10 + .../includes/article.back/news_on_main.html | 10 + .../article.back/news_on_main_logo.html | 10 + .../article.back/news_on_main_logo.html.back | 10 + .../includes/article.back/news_preview.html | 10 + .../client/includes/article/article_logo.html | 4 +- .../article/news_logo_in_catalog.html | 2 +- .../includes/article/news_on_main_logo.html | 2 +- .../article/news_on_main_logo.html.back | 10 + .../client/includes/article/news_preview.html | 4 +- .../client/includes/banners/under_search.html | 36 +- templates/client/includes/booking_block.html | 4 +- templates/client/includes/catalog_search.html | 16 +- .../client/includes/catalog_search_main.html | 16 +- .../includes/company/company_object.html | 4 +- .../conference/conference_object.html | 20 +- .../conference/default_description.html | 38 +- .../exposition/default_description.html | 62 +- .../includes/exposition/expo_list_paid.html | 306 +++--- .../client/includes/exposition/expo_paid.html | 20 +- .../exposition/exposition_object.html | 20 +- .../client/includes/exposition/price.html | 6 +- .../client/includes/exposition/programm.html | 6 +- .../client/includes/exposition/services.html | 3 - .../client/includes/exposition/statistic.html | 6 +- templates/client/includes/meta.html | 6 +- .../client/includes/place/place_object.html | 14 +- .../client/includes/place/place_services.html | 2 +- templates/client/index.html | 2 +- .../newsletters/activation_complete.html | 4 +- .../client/newsletters/activation_send.html | 4 +- .../newsletters/unsubscribe_success.html | 8 +- templates/client/robots.txt | 8 +- templates/client/service/participation.html | 20 +- templates/client/service/remotely.html | 7 +- templates/client/service/tickets.html | 6 +- templates/client/service/tour.html | 6 +- templates/client/service/translator.html | 9 +- .../client/simple_pages/yandex_check.html | 2 +- .../specialist_catalog/catalog_detailed.html | 6 +- .../html-cut/paid_exposition.html | 18 +- .../static_client/html-cut/subscribe.html | 20 +- .../subscribe_lending/css/all.css | 960 +++++++++--------- .../subscribe_lending/js/jquery.main.js | 54 +- 64 files changed, 1159 insertions(+), 998 deletions(-) create mode 100644 templates/client/includes/article.back/article_logo.html create mode 100644 templates/client/includes/article.back/article_on_main_preview.html create mode 100644 templates/client/includes/article.back/article_preview.html create mode 100644 templates/client/includes/article.back/blog_list.html create mode 100644 templates/client/includes/article.back/catalog_filter_period.html create mode 100644 templates/client/includes/article.back/news_list.html create mode 100644 templates/client/includes/article.back/news_logo_in_catalog.html create mode 100644 templates/client/includes/article.back/news_on_main.html create mode 100644 templates/client/includes/article.back/news_on_main_logo.html create mode 100644 templates/client/includes/article.back/news_on_main_logo.html.back create mode 100644 templates/client/includes/article.back/news_preview.html create mode 100644 templates/client/includes/article/news_on_main_logo.html.back 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/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 0afc06d7..1828c5a4 100644 --- a/proj/urls.py +++ b/proj/urls.py @@ -38,7 +38,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 @@