Révision 5c367ca4
Ajouté par Serghei Mihai (congés, retour 15/05) il y a plus de 7 ans
corbo/views.py | ||
---|---|---|
202 | 202 |
self.__dict__.update(kwargs) |
203 | 203 |
|
204 | 204 |
def items(self): |
205 |
limit = settings.RSS_ITEMS_LIMIT |
|
205 | 206 |
return models.Announce.objects.filter(publication_time__lte=timezone.now()).exclude( |
206 |
expiration_time__lt=timezone.now()).order_by('-publication_time') |
|
207 |
expiration_time__lt=timezone.now()).order_by('-publication_time')[:limit]
|
|
207 | 208 |
|
208 | 209 |
def item_title(self, item): |
209 | 210 |
return item.title |
Formats disponibles : Unified diff
limit items in rss feed (#14798)