Questions tagged [django-sitemaps]

Django framework for generating sitemaps

Django comes with a high-level sitemap-generating framework that makes creating sitemap XML files easy.

A sitemap is an XML file on your Web site that tells search-engine indexers how frequently your pages change and how “important” certain pages are in relation 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 you express this information in Python code.

It works much like Django’s syndication framework. To create a sitemap, just write a Sitemap class and point to it in your URLconf.

53 questions
0
votes
0 answers

Dynamically Creating a Type Dictionary with Python

With python and 'type()', I need to reproduce this 'structure', but dynamically: class Class1(BaseClass): def items(self): return [ 'abc', 'def', 'hij' ] def…
mrmuggles
  • 2,081
  • 4
  • 25
  • 44
0
votes
1 answer

How to use django sitemap framework with mongodb

I have to generate a sitemap file for my application and I used django sitemap framework with an application of sqlite database,works like a charm and now when I try it on my app which runs on "mongodb" It doesn't works and all of the documentation…
noobster
  • 872
  • 1
  • 6
  • 17
0
votes
1 answer

Django 1.6: How to ping google when sitemap is updated?

I'm trying to implement Django sitemaps and want to use the ping google when my sitemap is updated. I'm little confused about how to write the save method in my models whenever a new doctor entry is added to the database. Here is my models.py…
James L.
  • 1,143
  • 22
  • 52
0
votes
0 answers

django sitemap index error

I try to create a sitemap index based on the documentation but it fails. It works well when I show two models and my static views inside a single sitemap, despite it's a mess. This is what I have so far. I create a sitemaps.py. # sitemaps.py from…
oskargicast
  • 667
  • 1
  • 7
  • 14
0
votes
0 answers

Bad urls in sitemap

I use apache (port 8000) with nginx (port 80) to serve static files. And now I see that in sitemap.xml file I see urls like: http://mysite:8000/slug Can't figure out why I get it because on other websites I use pretty much the same configurations…
Dmitrii Mikhailov
  • 5,053
  • 7
  • 43
  • 69
0
votes
1 answer

Django sitemap various links for same model

I created sitemap for my website in Django as below sitemap class MyModelSitemap(Sitemap): changefreq = "daily" priority = 0.5 def items(self): return MyModel.objects.all() def lastmod(self, obj): return…
brsbilgic
  • 11,613
  • 16
  • 64
  • 94
-1
votes
1 answer

NoReverseMatch at /sitemap.xml Django

Django Noob here. NoReverseMatch at /sitemap.xml Reverse for 'article_detail' not found. 'article_detail' is not a valid view function or pattern name. See models.py screenshot (code) to understand the error. I don't know what I should put in…
Dipesh Paul
  • 439
  • 4
  • 9
-2
votes
1 answer

cannot concatenate 'str' and 'NoneType' objects Django sitemap

Exception Value: cannot concatenate 'str' and 'NoneType' objects class BrandSitemap(Sitemap): def items(self): return Page.objects.filter(parent__title=u'Бренды').values( 'short_url', 'publish_date') def…
1 2 3
4