summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/feeds.py
diff options
context:
space:
mode:
authorMagnus Hagander2019-02-05 22:01:05 +0000
committerMagnus Hagander2019-02-05 22:01:05 +0000
commita32f4007670330d05a834db1b67687ab8b8c3b34 (patch)
tree02322951c6ab86287bf26ff7634292df9357f81e /pgcommitfest/commitfest/feeds.py
parent83edf49e86d2db5d7a75f6c1068d3e62bda99923 (diff)
Convert all spaces to tabs
Diffstat (limited to 'pgcommitfest/commitfest/feeds.py')
-rw-r--r--pgcommitfest/commitfest/feeds.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/pgcommitfest/commitfest/feeds.py b/pgcommitfest/commitfest/feeds.py
index 025ddef..d858703 100644
--- a/pgcommitfest/commitfest/feeds.py
+++ b/pgcommitfest/commitfest/feeds.py
@@ -1,38 +1,38 @@
from django.contrib.syndication.views import Feed
class ActivityFeed(Feed):
- title = description = 'Commitfest Activity Log'
- link = 'https://commitfest.postgresql.org/'
+ title = description = 'Commitfest Activity Log'
+ link = 'https://commitfest.postgresql.org/'
- def __init__(self, activity, cf, *args, **kwargs):
- super(ActivityFeed, self).__init__(*args, **kwargs)
- self.activity = activity
- if cf:
- self.cfid = cf.id
- self.title = self.description = 'PostgreSQL Commitfest {0} Activity Log'.format(cf.name)
- else:
- self.cfid = None
+ def __init__(self, activity, cf, *args, **kwargs):
+ super(ActivityFeed, self).__init__(*args, **kwargs)
+ self.activity = activity
+ if cf:
+ self.cfid = cf.id
+ self.title = self.description = 'PostgreSQL Commitfest {0} Activity Log'.format(cf.name)
+ else:
+ self.cfid = None
- def items(self):
- return self.activity
+ def items(self):
+ return self.activity
- def item_title(self, item):
- if self.cfid:
- return item['name']
- else:
- return u'{cfname}: {name}'.format(**item)
+ def item_title(self, item):
+ if self.cfid:
+ return item['name']
+ else:
+ return u'{cfname}: {name}'.format(**item)
- def item_description(self, item):
- if self.cfid:
- return u"<div>Patch: {name}</div><div>User: {by}</div>\n<div>{what}</div>".format(**item)
- else:
- return u"<div>Commitfest: {cfname}</div><div>Patch: {name}</div><div>User: {by}</div><div>{what}</div>".format(**item)
+ def item_description(self, item):
+ if self.cfid:
+ return u"<div>Patch: {name}</div><div>User: {by}</div>\n<div>{what}</div>".format(**item)
+ else:
+ return u"<div>Commitfest: {cfname}</div><div>Patch: {name}</div><div>User: {by}</div><div>{what}</div>".format(**item)
- def item_link(self, item):
- if self.cfid:
- return 'https://commitfest.postgresql.org/{cfid}/{patchid}/'.format(cfid=self.cfid,**item)
- else:
- return 'https://commitfest.postgresql.org/{cfid}/{patchid}/'.format(**item)
+ def item_link(self, item):
+ if self.cfid:
+ return 'https://commitfest.postgresql.org/{cfid}/{patchid}/'.format(cfid=self.cfid,**item)
+ else:
+ return 'https://commitfest.postgresql.org/{cfid}/{patchid}/'.format(**item)
- def item_pubdate(self, item):
- return item['date']
+ def item_pubdate(self, item):
+ return item['date']