Skip to content

Instantly share code, notes, and snippets.

@seocam
Created August 24, 2012 20:57
Show Gist options
  • Save seocam/3455535 to your computer and use it in GitHub Desktop.
Save seocam/3455535 to your computer and use it in GitHub Desktop.
Testing

Using a custom template

If you need to use a template different from the Django's default (for example to generate a Google News sitemap) you can extend the you Sitemap class and setting a sitemap_template attribute. For Example:

from django.contrib.sitemaps import GenericSitemap

class GoogleNewsSitemap(GenericSitemap):

sitemap_template = 'sitemap_googlenews.xml'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment