[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH 3/4] Adapt feeds url code to Django 1.4
From: |
Thomas Petazzoni |
Subject: |
[Maposmatic-dev] [PATCH 3/4] Adapt feeds url code to Django 1.4 |
Date: |
Wed, 18 Apr 2012 22:19:21 +0200 |
Since 1.2, the declaration for the RSS feed url has slightly changed,
and the old way is no longer available in Django 1.4. So, switch to
the new way.
Signed-off-by: Thomas Petazzoni <address@hidden>
---
www/urls.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/www/urls.py b/www/urls.py
index b696340..44a6d06 100644
--- a/www/urls.py
+++ b/www/urls.py
@@ -28,14 +28,10 @@ from django.conf.urls.defaults import *
# from django.contrib import admin
# admin.autodiscover()
-import maposmatic.feeds
+from maposmatic.feeds import MapsFeed
import maposmatic.views
import settings
-feeds = {
- 'maps': maposmatic.feeds.MapsFeed,
-}
-
urlpatterns = patterns('',
url(r'^$', maposmatic.views.index,
name='main'),
@@ -75,8 +71,7 @@ urlpatterns = patterns('',
(r'^i18n/', include('django.conf.urls.i18n')),
# Feeds
- (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
- {'feed_dict': feeds}, 'rss-feed'),
+ url(r'^feeds/(?P<url>.*)/$', MapsFeed(), name='rss-feed'),
)
if settings.DEBUG:
--
1.7.5.4
Re: [Maposmatic-dev] [PATCH 3/4] Adapt feeds url code to Django 1.4, Thomas Petazzoni, 2012/04/23
[Maposmatic-dev] [PATCH 4/4] Read the GIS database lag from a local file, Thomas Petazzoni, 2012/04/18