0002-display-only-published-announces-in-RSS-feed.patch
corbo/views.py | ||
---|---|---|
202 | 202 |
self.__dict__.update(kwargs) |
203 | 203 | |
204 | 204 |
def items(self): |
205 |
return models.Announce.objects.exclude(expiration_time__lt=datetime.now()).order_by('-publication_time') |
|
205 |
return models.Announce.objects.exclude(publication_time__isnull=False, |
|
206 |
expiration_time__lt=datetime.now()).order_by('-publication_time') |
|
206 | 207 | |
207 | 208 |
def item_title(self, item): |
208 | 209 |
return item.title |
... | ... | |
214 | 215 |
return self.feed_item_link_template.format(item.pk) |
215 | 216 | |
216 | 217 |
def item_pubdate(self, item): |
217 |
return item.publication_time or item.mtime
|
|
218 |
return item.publication_time |
|
218 | 219 | |
219 | 220 | |
220 | 221 |
atom = AtomView() |
221 |
- |