fnp
/
prawokultury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix get_here_url on 404.
[prawokultury.git]
/
migdal
/
feeds.py
diff --git
a/migdal/feeds.py
b/migdal/feeds.py
index
9e01f19
..
33e9e0b
100644
(file)
--- a/
migdal/feeds.py
+++ b/
migdal/feeds.py
@@
-5,10
+5,10
@@
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
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 import api
from migdal.models import Category
-from migdal
.settings import TYPES_DICT
+from migdal
import app_settings
class EntriesFeed(Feed):
class EntriesFeed(Feed):
@@
-19,7
+19,7
@@
class EntriesFeed(Feed):
else:
category = None
if type_db:
else:
category = None
if type_db:
- entry_type = TYPES_DICT[type_db]
+ entry_type =
app_settings.
TYPES_DICT[type_db]
else:
entry_type = None
return {'entry_type': entry_type, 'category': category}
else:
entry_type = None
return {'entry_type': entry_type, 'category': category}
@@
-49,3
+49,8
@@
class EntriesFeed(Feed):
def item_description(self, item):
return item.lead
def item_description(self, item):
return item.lead
+ image = item.image.url if item.image else "/static/img/square-logo.png"
+ return string_concat("<img src='%s'/>" % image, item.lead)
+
+ def item_pubdate(self, item):
+ return item.published_at