Index: django/contrib/sitemaps/views.py
===================================================================
--- django/contrib/sitemaps/views.py	(revision 10628)
+++ django/contrib/sitemaps/views.py	(working copy)
@@ -22,7 +22,7 @@
     xml = loader.render_to_string('sitemap_index.xml', {'sitemaps': sites})
     return HttpResponse(xml, mimetype='application/xml')
 
-def sitemap(request, sitemaps, section=None):
+def sitemap(request, sitemaps, section=None, template='sitemap.xml'):
     maps, urls = [], []
     if section is not None:
         if section not in sitemaps:
@@ -41,5 +41,5 @@
             raise Http404("Page %s empty" % page)
         except PageNotAnInteger:
             raise Http404("No page '%s'" % page)
-    xml = smart_str(loader.render_to_string('sitemap.xml', {'urlset': urls}))
+    xml = smart_str(loader.render_to_string(template, {'urlset': urls}))
     return HttpResponse(xml, mimetype='application/xml')
Index: django/contrib/sitemaps/__init__.py
===================================================================
--- django/contrib/sitemaps/__init__.py	(revision 10628)
+++ django/contrib/sitemaps/__init__.py	(working copy)
@@ -38,7 +38,7 @@
     # http://sitemaps.org/protocol.php#index.
     limit = 50000
 
-    def __get(self, name, obj, default=None):
+    def _get(self, name, obj, default=None):
         try:
             attr = getattr(self, name)
         except AttributeError:
@@ -59,19 +59,22 @@
         return self._paginator
     paginator = property(_get_paginator)
 
+    def get_url_info(self, item, current_site):
+        loc = "http://%s%s" % (current_site.domain, self._get('location', item))
+        url_info = {
+            'location':   loc,
+            'lastmod':    self._get('lastmod', item, None),
+            'changefreq': self._get('changefreq', item, None),
+            'priority':   self._get('priority', item, None)
+        }
+        return url_info
+
     def get_urls(self, page=1):
         from django.contrib.sites.models import Site
         current_site = Site.objects.get_current()
         urls = []
         for item in self.paginator.page(page).object_list:
-            loc = "http://%s%s" % (current_site.domain, self.__get('location', item))
-            url_info = {
-                'location':   loc,
-                'lastmod':    self.__get('lastmod', item, None),
-                'changefreq': self.__get('changefreq', item, None),
-                'priority':   self.__get('priority', item, None)
-            }
-            urls.append(url_info)
+            urls.append(self.get_url_info(item, current_site))
         return urls
 
 class FlatPageSitemap(Sitemap):
@@ -98,3 +101,17 @@
         if self.date_field is not None:
             return getattr(item, self.date_field)
         return None
+
+class NewsSitemap(Sitemap):
+    # This limit is defined by Google. See the index documentation at
+    # http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=74288
+    limit = 1000
+
+
+    def get_url_info(self, item, current_site):
+        url_info = super(NewsSitemap, self).get_url_info(item, current_site)
+        url_info.update({
+            'publication_date': self._get('publication_date', item, None),
+            'keywords': self._get('keywords', item, None),
+        })
+        return url_info
Index: django/contrib/sitemaps/templates/news_sitemap.xml
===================================================================
--- django/contrib/sitemaps/templates/news_sitemap.xml	(revision 0)
+++ django/contrib/sitemaps/templates/news_sitemap.xml	(revision 0)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset
+  xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+  xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
+{% spaceless %}
+{% for url in urlset %}
+  <url>
+    <loc>{{ url.location }}</loc>
+    {% if url.lastmod %}<lastmod>{{ url.lastmod|date:"Y-m-d" }}</lastmod>{% endif %}
+    {% if url.changefreq %}<changefreq>{{ url.changefreq }}</changefreq>{% endif %}
+    {% if url.priority %}<priority>{{ url.priority }}</priority>{% endif %}
+    <news:news>
+      {% if url.publication_date %}<news:publication_date>{{ url.publication_date|date:"Y-m-d" }}</news:publication_date>{% endif %}
+      {% if url.keywords %}<news:keywords>Business, Mergers, Acquisitions</news:keywords>{% endif %}
+    </news:news>
+   </url>
+{% endfor %}
+{% endspaceless %}
+</urlset>

Property changes on: django/contrib/sitemaps/templates/news_sitemap.xml
___________________________________________________________________
Added: svn:eol-style
   + native

Index: docs/ref/contrib/sitemaps.txt
===================================================================
--- docs/ref/contrib/sitemaps.txt	(revision 10628)
+++ docs/ref/contrib/sitemaps.txt	(working copy)
@@ -8,9 +8,10 @@
    :synopsis: A framework for generating Google sitemap XML files.
 
 Django comes with a high-level sitemap-generating framework that makes
-creating sitemap_ XML files easy.
+creating sitemap_ and newssitemap_ XML files easy.
 
 .. _sitemap: http://www.sitemaps.org/
+.. _newssitemap: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=74288
 
 Overview
 ========
@@ -20,12 +21,20 @@
 to other pages on your site. This information helps search engines index your
 site.
 
-The Django sitemap framework automates the creation of this XML file by letting
+A Google News sitemap is an XML file that allows you to have more control over
+the content you submit to Google News. Creating a News sitemap allows you to
+tell Google about all your news articles, their publication date and keywords.
+A news sitemaps differs only slightly from a normal sitemap.  The most important 
+difference is the requirement for your site to register (and be accepted) into
+the list of news sites that google news indexes.
+
+The Django sitemap framework automates the creation of these XML files by letting
 you express this information in Python code.
 
 It works much like Django's :ref:`syndication framework
 <ref-contrib-syndication>`. To create a sitemap, just write a
-:class:`~django.contrib.sitemaps.Sitemap` class and point to it in your
+:class:`~django.contrib.sitemaps.Sitemap` and/or
+:class:`~django.contrib.sitemaps.Sitemap` class and point to them in your
 :ref:`URLconf <topics-http-urls>`.
 
 Installation
@@ -51,13 +60,20 @@
 Initialization
 ==============
 
-To activate sitemap generation on your Django site, add this line to your
+To activate sitemap generation on your Django site, add the applicable lines to your
 :ref:`URLconf <topics-http-urls>`::
 
    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
 
 This tells Django to build a sitemap when a client accesses :file:`/sitemap.xml`.
 
+For a google news sitemap, the setup is nearly identical 
+:ref:`URLconf <topics-http-urls>`::
+
+   (r'^news_sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': news_sitemaps, 'template': 'news_sitemap.xml'})
+
+This tells Django to build a news sitemap when a client accesses :file:`/news_sitemap.xml`.
+
 The name of the sitemap file is not important, but the location is. Search
 engines will only index links in your sitemap for the current URL level and
 below. For instance, if :file:`sitemap.xml` lives in your root directory, it may
@@ -67,11 +83,20 @@
 
 The sitemap view takes an extra, required argument: ``{'sitemaps': sitemaps}``.
 ``sitemaps`` should be a dictionary that maps a short section label (e.g.,
-``blog`` or ``news``) to its :class:`~django.contrib.sitemaps.Sitemap` class
-(e.g., ``BlogSitemap`` or ``NewsSitemap``). It may also map to an *instance* of
+``blog`` or ``events``) to its :class:`~django.contrib.sitemaps.Sitemap` class
+(e.g., ``BlogSitemap`` or ``EventSitemap``). It may also map to an *instance* of
 a :class:`~django.contrib.sitemaps.Sitemap` class (e.g.,
 ``BlogSitemap(some_var)``).
 
+The sitemap framework takes an extra, optional argument: ``{'template': 'news_sitemap.xml'}``.
+The :file:`news_sitemap.xml` generates a Google News Sitemap. When using this
+template, the 'sitemaps' argument should only contain 
+:class:`~django.contrib.sitemaps.NewsSitemap` classes (or instances).
+Because :class:`~django.contrib.sitemaps.NewsSitemap` extends 
+:class:`~django.contrib.sitemaps.Sitemap` the rest of this documentaiton will
+only refer to those attributes that are unique to the 
+:class:`~django.contrib.sitemaps.NewsSitemap` classes (or instances).
+
 Sitemap classes
 ===============
 
@@ -209,6 +234,39 @@
 
         .. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef
 
+NewsSitemap class reference
+=======================
+
+.. class:: NewsSitemap
+
+    A ``NewsSitemap`` class can define all of the following methods/attributes in addition to those above:
+
+    .. attribute:: Sitemap.items
+
+        **Required.** A method that returns a list of objects. (See :class:`~django.contrib.sitemaps.Sitemap`)
+        In the case of a news sitemap, this method must only return news items from the past 3 days.
+
+    .. attribute:: Sitemap.publication_date
+
+        **Required.** A method that takes on argument -- an object as returned by
+        :attr:`~Sitemap.items()` -- and return that object's published_date, as a Python
+        ``datetime.datetime`` object.
+
+    .. attribute:: Sitemap.keywords
+
+        **Optional.** Either a method or attribute.
+
+        If it's a method, it should return a string containing the comma-separated list of
+        keywords describing the content of the article returned by :attr:`~Sitemap.items()`.
+
+        If it's an attribute, its value should be a string containing the comma-separated list
+        of keywords describing the content of the article returned by :attr:`~Sitemap.items()`.
+
+        In both cases, the keywords may drawn from, but not limited to _googlenewscategories.
+
+
+.. _googlenewscategories: http://www.google.com/support/webmasters/bin/answer.py?answer=42993
+
 Shortcuts
 =========
 
