diff --git a/django/contrib/gis/sitemaps/georss.py b/django/contrib/gis/sitemaps/georss.py index f75cf804ba..ccb7dc2e91 100644 --- a/django/contrib/gis/sitemaps/georss.py +++ b/django/contrib/gis/sitemaps/georss.py @@ -8,13 +8,13 @@ class GeoRSSSitemap(Sitemap): def __init__(self, feed_dict, slug_dict=None): """ This sitemap object initializes on a feed dictionary (as would be passed - to `django.contrib.syndication.views.feed`) and a slug dictionary. + to `django.contrib.gis.views.feed`) and a slug dictionary. If the slug dictionary is not defined, then it's assumed the keys provide the URL parameter to the feed. However, if you have a complex feed (e.g., you override `get_object`, then you'll need to provide a slug dictionary. - The slug dictionary should have the same keys as the feed dictionary, but - each value in the slug dictionary should be a sequence of slugs that may - be used for valid feeds. For example, let's say we have a feed that + The slug dictionary should have the same keys as the feed dictionary, but + each value in the slug dictionary should be a sequence of slugs that may + be used for valid feeds. For example, let's say we have a feed that returns objects for a specific ZIP code in our feed dictionary: feed_dict = {'zipcode' : ZipFeed} @@ -35,7 +35,7 @@ class GeoRSSSitemap(Sitemap): self.locations.append('%s/%s' % (section, slug)) else: self.locations.append(section) - + def get_urls(self, page=1, site=None): """ This method is overrridden so the appropriate `geo_format` attribute @@ -49,5 +49,5 @@ class GeoRSSSitemap(Sitemap): return self.locations def location(self, obj): - return urlresolvers.reverse('django.contrib.syndication.views.feed', args=(obj,)) + return urlresolvers.reverse('django.contrib.gis.views.feed', args=(obj,)) diff --git a/django/contrib/gis/tests/__init__.py b/django/contrib/gis/tests/__init__.py index 27d221a8f3..3d04242fa8 100644 --- a/django/contrib/gis/tests/__init__.py +++ b/django/contrib/gis/tests/__init__.py @@ -100,15 +100,16 @@ class GeoDjangoTestSuiteRunner(DjangoTestSuiteRunner): # Constructing the new INSTALLED_APPS, and including applications # within the GeoDjango test namespace. - new_installed = ['django.contrib.sites', - 'django.contrib.sitemaps', - 'django.contrib.gis', - ] + new_installed = [ + 'django.contrib.sites', + 'django.contrib.sitemaps', + 'django.contrib.gis', + ] # Calling out to `geo_apps` to get GeoDjango applications supported # for testing. new_installed.extend(geo_apps()) - settings.INSTALLED_APPS = new_installed + settings.INSTALLED_APPS = list(self.old_installed) + new_installed # SITE_ID needs to be set settings.SITE_ID = 1 diff --git a/django/contrib/gis/tests/geoapp/urls.py b/django/contrib/gis/tests/geoapp/urls.py index edaf2802ef..b3604c7aa0 100644 --- a/django/contrib/gis/tests/geoapp/urls.py +++ b/django/contrib/gis/tests/geoapp/urls.py @@ -2,7 +2,7 @@ from django.conf.urls.defaults import * from feeds import feed_dict urlpatterns = patterns('', - (r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feed_dict}), + (r'^feeds/(?P.*)/$', 'django.contrib.gis.views.feed', {'feed_dict': feed_dict}), ) from sitemaps import sitemaps @@ -10,5 +10,5 @@ urlpatterns += patterns('django.contrib.gis.sitemaps.views', (r'^sitemap.xml$', 'index', {'sitemaps' : sitemaps}), (r'^sitemaps/(?P
\w+)\.xml$', 'sitemap', {'sitemaps' : sitemaps}), (r'^sitemaps/kml/(?P