~widelands-dev/widelands-website/django_staticfiles

404.2.7 by franku
updated pip_requirements.text; more conversion on generic views
1
from django.contrib.syndication.views import Feed, FeedDoesNotExist
17 by Holger Rapp
Main Page contains now the same informations as before
2
from django.core.exceptions import ObjectDoesNotExist
489.1.13 by franku
django.conf.urlresolvers -> django.urls
3
from django.urls import reverse
404.2.2 by franku
test install
4
from news.models import Post, Category
17 by Holger Rapp
Main Page contains now the same informations as before
5
404.2.18 by franku
News and wiki feeds again, validated through w3c; cleanups
6
# Validated through http://validator.w3.org/feed/
438.1.6 by franku
run the script
7
8
17 by Holger Rapp
Main Page contains now the same informations as before
9
class NewsPostsFeed(Feed):
404.2.18 by franku
News and wiki feeds again, validated through w3c; cleanups
10
    # RSS Feed
11
    title = 'Widelands news feed'
30 by Holger Rapp
Fixed a small layout issue, added RSS feeds
12
    description = 'The news section from the widelands.org homepage'
404.2.20 by franku
Activated feeds for pybb; cleanups
13
    title_template = 'news/feeds/posts_title.html'
14
    description_template = 'news/feeds/posts_description.html'
17 by Holger Rapp
Main Page contains now the same informations as before
15
404.2.17 by franku
Reactivated feeds for main Page and Wiki; Removed a BeautifulSoup warning; renamed some files which i believe they are not used (added 'delete' to filename)
16
    def items(self):
17
        return Post.objects.published()[:10]
18
17 by Holger Rapp
Main Page contains now the same informations as before
19
    def link(self):
20
        return reverse('news_index')
21
404.2.17 by franku
Reactivated feeds for main Page and Wiki; Removed a BeautifulSoup warning; renamed some files which i believe they are not used (added 'delete' to filename)
22
    def item_pubdate(self, item):
23
        return item.publish