summaryrefslogtreecommitdiff
path: root/urls.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-06-08 10:52:53 -0500
committerDan McGee <dan@archlinux.org>2010-06-08 10:52:53 -0500
commit89cae2bcb5610fa50d70e47bf74853bb04dbca9c (patch)
tree3dd2c25f7fc8365230870310fbd381646f5efbd6 /urls.py
parent8bf0bfeac7f1cdfee19432b3eb77c48f4fedef08 (diff)
Update feeds to new 1.2 framework
Feeds are now views-based and don't need the dictionary anymore. get_object() now takes named arguments as well making it a bit more understandable when reading the code. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/urls.py b/urls.py
index 8fe7d7d9..64e60ccb 100644
--- a/urls.py
+++ b/urls.py
@@ -10,12 +10,6 @@ from main.models import Todolist
from feeds import PackageFeed, NewsFeed
from sitemaps import NewsSitemap, PackagesSitemap, PackageFilesSitemap
-
-feeds = {
- 'news': NewsFeed,
- 'packages': PackageFeed,
-}
-
sitemaps = {
'news': NewsSitemap,
'packages': PackagesSitemap,
@@ -85,8 +79,12 @@ urlpatterns = patterns('',
# Feeds and sitemaps
(r'^feeds/$', 'public.views.feeds', {}, 'feeds-list'),
- (r'^feeds/(?P<url>.*)/$',
- 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
+ (r'^feeds/news/$', NewsFeed()),
+ (r'^feeds/packages/$', PackageFeed()),
+ (r'^feeds/packages/(?P<arch>[A-z0-9]+)/$',
+ PackageFeed()),
+ (r'^feeds/packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
+ PackageFeed()),
(r'^sitemap.xml$', 'django.contrib.sitemaps.views.index',
{'sitemaps': sitemaps}),
(r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap',