Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Renamed django.contrib.sitemap to django.contrib.sitemaps, to be more…

… consistent with our plural form for these sorts of things.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 60ebb616a91a6993a42492dab043024a2ca38030 1 parent a30653a
Adrian Holovaty authored
0  django/contrib/sitemap/__init__.py → django/contrib/sitemaps/__init__.py
File renamed without changes
0  django/contrib/sitemap/templates/sitemap.xml → django/contrib/sitemaps/templates/sitemap.xml
File renamed without changes
0  django/contrib/sitemap/templates/sitemap_index.xml → django/contrib/sitemaps/templates/sitemap_index.xml
File renamed without changes
0  django/contrib/sitemap/views.py → django/contrib/sitemaps/views.py
File renamed without changes
28  docs/sitemaps.txt
@@ -31,7 +31,7 @@ Installation
31 31
 
32 32
 To install the sitemap app, follow these steps:
33 33
 
34  
-    1. Add ``'django.contrib.sitemap'`` to your INSTALLED_APPS_ setting.
  34
+    1. Add ``'django.contrib.sitemaps'`` to your INSTALLED_APPS_ setting.
35 35
     2. Make sure ``'django.template.loaders.app_directories.load_template_source'``
36 36
        is in your TEMPLATE_LOADERS_ setting. It's in there by default, so
37 37
        you'll only need to change this if you've changed that setting.
@@ -51,7 +51,7 @@ Initialization
51 51
 To activate sitemap generation on your Django site, add this line to your
52 52
 URLconf_:
53 53
 
54  
-    (r'^sitemap.xml$', 'django.contrib.sitemap.views.sitemap', {'sitemaps': sitemaps})
  54
+    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
55 55
 
56 56
 This tells Django to build a sitemap when a client accesses ``/sitemap.xml``.
57 57
 
@@ -82,7 +82,7 @@ In the simplest case, all these sections get lumped together into one
82 82
 sitemap index that references individual sitemap files, one per section. (See
83 83
 `Creating a sitemap index`_ below.)
84 84
 
85  
-``Sitemap`` classes must subclass ``django.contrib.sitemap.Sitemap``. They can
  85
+``Sitemap`` classes must subclass ``django.contrib.sitemaps.Sitemap``. They can
86 86
 live anywhere in your codebase.
87 87
 
88 88
 A simple example
@@ -92,7 +92,7 @@ Let's assume you have a blog system, with an ``Entry`` model, and you want your
92 92
 sitemap to include all the links to your individual blog entries. Here's how
93 93
 your sitemap class might look::
94 94
 
95  
-    from django.contrib.sitemap import Sitemap
  95
+    from django.contrib.sitemaps import Sitemap
96 96
     from mysite.blog.models import Entry
97 97
 
98 98
     class BlogSitemap(Sitemap):
@@ -239,7 +239,7 @@ Example
239 239
 Here's an example of a URLconf_ using both::
240 240
 
241 241
     from django.conf.urls.defaults import *
242  
-    from django.contrib.sitemap import FlatPageSitemap, GenericSitemap
  242
+    from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap
243 243
     from mysite.blog.models import Entry
244 244
 
245 245
     info_dict = {
@@ -257,7 +257,7 @@ Here's an example of a URLconf_ using both::
257 257
         # ...
258 258
 
259 259
         # the sitemap
260  
-        (r'^sitemap.xml$', 'django.contrib.sitemap.views.sitemap', {'sitemaps': sitemaps})
  260
+        (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
261 261
     )
262 262
 
263 263
 .. _URLconf: http://www.djangoproject.com/documentation/url_dispatch/
@@ -269,15 +269,15 @@ The sitemap framework also has the ability to create a sitemap index that
269 269
 references individual sitemap files, one per each section defined in your
270 270
 ``sitemaps`` dictionary. The only differences in usage are:
271 271
 
272  
-    * You use two views in your URLconf: ``django.contrib.sitemap.views.index``
273  
-      and ``django.contrib.sitemap.views.sitemap``.
274  
-    * The ``django.contrib.sitemap.views.sitemap`` view should take a
  272
+    * You use two views in your URLconf: ``django.contrib.sitemaps.views.index``
  273
+      and ``django.contrib.sitemaps.views.sitemap``.
  274
+    * The ``django.contrib.sitemaps.views.sitemap`` view should take a
275 275
       ``section`` keyword argument.
276 276
 
277 277
 Here is what the relevant URLconf lines would look like for the example above::
278 278
 
279  
-    (r'^sitemap.xml$', 'django.contrib.sitemap.views.index', {'sitemaps': sitemaps})
280  
-    (r'^sitemap-(?P<section>.+).xml$', 'django.contrib.sitemap.views.sitemap', {'sitemaps': sitemaps})
  279
+    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': sitemaps})
  280
+    (r'^sitemap-(?P<section>.+).xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
281 281
 
282 282
 This will automatically generate a ``sitemap.xml`` file that references
283 283
 both ``sitemap-flatpages.xml`` and ``sitemap-blog.xml``. The ``Sitemap``
@@ -288,7 +288,7 @@ Pinging Google
288 288
 
289 289
 You may want to "ping" Google when your sitemap changes, to let it know to
290 290
 reindex your site. The framework provides a function to do just that:
291  
-``django.contrib.sitemap.ping_google()``.
  291
+``django.contrib.sitemaps.ping_google()``.
292 292
 
293 293
 ``ping_google()`` takes an optional argument, ``sitemap_url``, which should be
294 294
 the absolute URL of your site's sitemap (e.g., ``'/sitemap.xml'``). If this
@@ -296,12 +296,12 @@ argument isn't provided, ``ping_google()`` will attempt to figure out your
296 296
 sitemap by performing a reverse looking in your URLconf.
297 297
 
298 298
 ``ping_google()`` raises the exception
299  
-``django.contrib.sitemap.SitemapNotFound`` if it cannot determine your sitemap
  299
+``django.contrib.sitemaps.SitemapNotFound`` if it cannot determine your sitemap
300 300
 URL.
301 301
 
302 302
 One useful way to call ``ping_google()`` is from a model's ``save()`` method::
303 303
 
304  
-    from django.contrib.sitemap import ping_google
  304
+    from django.contrib.sitemaps import ping_google
305 305
 
306 306
     class Entry(models.Model):
307 307
         # ...

0 notes on commit 60ebb61

Please sign in to comment.
Something went wrong with that request. Please try again.