From c84aecfe48b0685b2a40865823a2faed2679136c Mon Sep 17 00:00:00 2001 From: Kotiuk Nazarii Date: Mon, 11 May 2015 22:45:49 +0300 Subject: [PATCH] Pgtologue bug --- photologue/models.py | 17 +++++++++-------- templates/client/includes/event_steps.html | 2 +- templates/client/includes/news.html | 2 +- .../client/includes/place/place_object.html | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/photologue/models.py b/photologue/models.py index eddf4de7..7e5ab25c 100644 --- a/photologue/models.py +++ b/photologue/models.py @@ -33,16 +33,17 @@ from django.contrib.sites.models import Site # Required PIL classes may or may not be available from the root namespace # depending on the installation method used. try: - import Image - import ImageFile - import ImageFilter - import ImageEnhance + from PIL import Image + from PIL import ImageFile + from PIL import ImageFilter + from PIL import ImageEnhance + except ImportError: try: - from PIL import Image - from PIL import ImageFile - from PIL import ImageFilter - from PIL import ImageEnhance + import Image + import ImageFile + import ImageFilter + import ImageEnhance except ImportError: raise ImportError( 'Photologue was unable to import the Python Imaging Library. Please confirm it`s installed and available on your current Python path.') diff --git a/templates/client/includes/event_steps.html b/templates/client/includes/event_steps.html index 4b432828..b2ead11d 100644 --- a/templates/client/includes/event_steps.html +++ b/templates/client/includes/event_steps.html @@ -6,7 +6,7 @@
  • {% if event.catalog == '/expo/' %}{% trans 'Создайте уникальную концепцию' %}{% else %}{% trans 'Зарегистрируйтесь на событие' %}{% endif %}
    {% if event.catalog == '/expo/' %}{% trans 'Заявка на участие' %}{% else %}{% trans 'Регистрация' %}{% endif %} diff --git a/templates/client/includes/news.html b/templates/client/includes/news.html index 6ce8c206..0b48df59 100644 --- a/templates/client/includes/news.html +++ b/templates/client/includes/news.html @@ -14,7 +14,7 @@ {{ item.main_title }} - {{ item.created|date:"d E Y" }} + {{ item.publish_date|date:"d E Y" }}
  • diff --git a/templates/client/includes/place/place_object.html b/templates/client/includes/place/place_object.html index a6036a85..2ca4bd36 100644 --- a/templates/client/includes/place/place_object.html +++ b/templates/client/includes/place/place_object.html @@ -244,7 +244,7 @@ {% endwith %}
    - {{ event.country }}, {{ event.city }} + {{ event.country }}, {{ event.city }}
    @@ -315,7 +315,7 @@
    {{ pl.total_area }}
    {% endif %}
    - {{ pl.country }}, {{ pl.city }}, + {{ pl.country }}, {{ pl.city }}, {{ pl.adress }}