mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Switch to using the new feeds framework
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
from django.contrib.syndication.feeds import Feed
|
||||
from django.contrib.syndication.views import Feed
|
||||
|
||||
from models import Version
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from django.contrib.syndication.feeds import Feed
|
||||
from django.contrib.syndication.views import Feed
|
||||
|
||||
from models import Event
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from django.contrib.syndication.feeds import Feed
|
||||
from django.contrib.syndication.views import Feed
|
||||
|
||||
from models import NewsArticle
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from django.contrib.syndication.feeds import Feed
|
||||
from django.contrib.syndication.views import Feed
|
||||
|
||||
from models import PwnPost
|
||||
|
||||
|
@ -15,12 +15,6 @@ from core.feeds import VersionFeed
|
||||
from news.feeds import NewsFeed
|
||||
from events.feeds import EventFeed
|
||||
from pwn.feeds import PwnFeed
|
||||
feeds = {
|
||||
'versions': VersionFeed,
|
||||
'news': NewsFeed,
|
||||
'events': EventFeed,
|
||||
'weeklynews': PwnFeed,
|
||||
}
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^$', 'pgweb.core.views.home'),
|
||||
@ -75,7 +69,10 @@ urlpatterns = patterns('',
|
||||
###
|
||||
# RSS feeds
|
||||
###
|
||||
(r'^(versions|news|events|weeklynews).rss$', 'django.contrib.syndication.views.feed', {'feed_dict':feeds}),
|
||||
(r'^versions.rss$', VersionFeed()),
|
||||
(r'^news.rss$', NewsFeed()),
|
||||
(r'^events.rss$', EventFeed()),
|
||||
(r'^weeklynews.rss$', PwnFeed()),
|
||||
|
||||
###
|
||||
# Special sections
|
||||
|
Reference in New Issue
Block a user