From ea7d26f5d66da1ea50c548629a4940ff397b26bb Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 1 Oct 2012 16:40:22 +0200 Subject: [PATCH] some fixes --- migdal/feeds.py | 7 ++++++- migdal/templates/migdal/entry/entry_detail.html | 2 +- migdal/templates/migdal/entry/entry_promobox.html | 4 ++-- prawokultury/helpers.py | 2 +- prawokultury/settings.d/30-locale.conf | 2 +- prawokultury/settings.d/40-middleware.conf | 1 + realip_middleware.py | 7 +++++++ 7 files changed, 19 insertions(+), 6 deletions(-) create mode 100755 realip_middleware.py diff --git a/migdal/feeds.py b/migdal/feeds.py index 9e01f19..8203735 100644 --- a/migdal/feeds.py +++ b/migdal/feeds.py @@ -5,7 +5,7 @@ from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext as _, string_concat from migdal import api from migdal.models import Category from migdal.settings import TYPES_DICT @@ -49,3 +49,8 @@ class EntriesFeed(Feed): def item_description(self, item): return item.lead + image = item.image.url if item.image else "/static/img/square-logo.png" + return string_concat("" % image, item.lead) + + def item_pubdate(self, item): + return item.date diff --git a/migdal/templates/migdal/entry/entry_detail.html b/migdal/templates/migdal/entry/entry_detail.html index ef842b8..5827d08 100755 --- a/migdal/templates/migdal/entry/entry_detail.html +++ b/migdal/templates/migdal/entry/entry_detail.html @@ -3,7 +3,7 @@ {% load common_tags migdal_tags share %} -{% block "titleextra" %}{{ entry.title }} ::{% endblock %} +{% block "titleextra" %}{{ entry.title }} :: {% endblock %} {% block "ogtitle" %}{{ entry.title }}{% endblock %} {% block "ogtype" %}article{% endblock %} {% block "ogdescription"%}{{ entry.lead|striptags|truncatewords:10 }}{% endblock %} diff --git a/migdal/templates/migdal/entry/entry_promobox.html b/migdal/templates/migdal/entry/entry_promobox.html index b1b0449..f68b487 100755 --- a/migdal/templates/migdal/entry/entry_promobox.html +++ b/migdal/templates/migdal/entry/entry_promobox.html @@ -1,11 +1,11 @@ -{% load i18n %} +{% load i18n thumbnail %}