Package: django-sitemapper
A small Django app to manage sitemap.xml overrides on a per-object basis.Brief installation notes are given below, but see ouronline documentationfor more details.RequirementsDjango 1.4.2 or greater, Python 2.7 or greater.InstallationUse your favorite Python installer to install it from PyPI:$ pip install django-sitemapperIf you are usingpipversion 1.4 or later you’ll need to explicitly allow pre-release installation:$ pip install --pre django-sitemapperOr get the source from the application site:$ hg clone https://bitbucket.org/mhurt/django-sitemapper
$ cd django-sitemapper
$ python setup.py installConfigurationAdd"sitemapper"to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = {
  ...
  'sitemapper'
}For Django 1.7 users, runpython manage.py migrateto create the
models. Otherwise simply runpython manage.py syncdb.Setting up a sitemapCreate asitemaps.pyfile within your app directory and add the following
(replacing MyModel with whatever you called yours):# sitemaps.py
from sitemapper.sitemaps import Sitemap
from .models import MyModel


class MyModelSitemap(Sitemap):

    # Set some defaults for your model's sitemap...
    default_changefreq = 'weekly'
    default_priority = 0.5

    # ... and the queryset you want to use...
    queryset = MyModel.objects.all()

    # ... and some means to access the last-modified timestamp.
    def lastmod(self, obj):
        return obj.lastmodifiedFrom this point onwards you can useMyModelSitemapas you would any other
sitemaps instance. SeeDjango’s sitemaps documentationfor how to wire this up with your urlconf.ContributeIssue Tracker:https://bitbucket.org/mhurt/django-sitemapper/issuesSource Code:https://bitbucket.org/mhurt/django-sitemapper/LicenseThe project is licensed under the MIT license.Release Notes1.0Fixed: Tests now run correctly on Django < 1.6 thanks to django-discover-runner.Improved tests.Added new content to docs/sitemaps covering basic usage steps.Hurrah! Finally reached v1.0 :)1.0.0-rcRefactored:sitemapper.sitemapshas been refactored, with improved docstrings (i.e. I’ve written some).New:sitemapper.sitemaps.SitemapBasemoves queryset and ContentType
handling to a root class. The actualSitemapclass now extends this but
is otherwise unchanged.New:sitemapper.sitemaps.GenericSitemapextends theSitemapclass but
mirrors the signature ofdjango.contrib.sitemaps.GenericSitemap. The only
difference is that passingpriorityorchangefreqat initialisation
only overrides the default fallbacks.Please let me know if you have any questions, suggestions or problems to report
via theissue tracker.1.0.0-beta.3Deprecated:sitemapper.mixins.Sitemaphas moved; usesitemapper.sitemaps.Sitemapinstead.Fixed: Incorrect tox testenv.Changed: Refactored ContentType lookup into custom manager method.Sitemapnow usesSitemapEntry.get_for_model()method.1.0.0-beta.2Schema:SitemapEntry.priorityandSitemapEntry.changefreqare now nullable.Fixed: admin select widget issue for SitemapEntry.priority values of decimal integers (i.e. ‘0.0’ and ‘1.0’)Changed: RefactoredSitemap.priority()andSitemap.changefreq()methods.New: Added support for South migrations.New: Support Django 1.4.2 and greater.1.0.0-beta.1Backwards Incompatible: Removedsitemapper.SitemappedModelmixin.Changed:sitemapper.mixins.Sitemapnow handles all lookups internally, and more efficiently.New: Support Django 1.5 and greater.