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
1
vote
1 answer

Django sitemaps: XML declaration allowed only at the start of the document

I have been working on the implementation of the sitemaps on Django-2.2 for the Blog website. The code structure I followed was- Sitemaps.py from django.contrib.sitemaps import Sitemap from .models import Post class PostSitemap(Sitemap): …
1
vote
1 answer

Wagtail 2.4 - get_sitemap_urls() takes 1 positional argument but 2 were given

I used to have a working sitemap before I upgraded to Wagtail 2.4. I have upgraded my site according to the documentation here: http://docs.wagtail.io/en/v2.4/reference/contrib/sitemaps.html but still no such luck. The error I'm getting is…
kbdev
  • 1,225
  • 1
  • 13
  • 33
1
vote
2 answers

Sitemap in Django 1.10.7

I'm having issues getting the Django setup to generate a sitemap for me. I have added the following to my settings file 'django.contrib.sites', 'django.contrib.sitemaps', and im my urls.py file i have the following: from django.conf.urls import…
Keith Riches
  • 63
  • 1
  • 8
1
vote
2 answers

Trying to run django-static-sitemaps in terminal using "django-admin refresh_sitemap" gives error of "Unknown command: 'refresh_sitemap''

I'm trying to use django-static-sitemaps as I'd like to serve millions of urls in my sitemap. I've installed it, it's in the installed apps, but when I try to generate the sitemap itself (https://github.com/xaralis/django-static-sitemaps), by typing…
William
  • 171
  • 1
  • 12
1
vote
0 answers

Import WordPress sitemaps into Django sitemaps

I am trying to refer to the WordPress blog through my sub domain. example - blog.example.com WordPress is hosted on GoDaddy My main app (main domain) is on Django (hosted on Heroku). Have site maps set up on Django apps as well…
headcrabz
  • 101
  • 5
1
vote
1 answer

Django sitemap.xml - where is it?

I've made a sitemap for my website using Django-sitemaps, the compilation went ok, the file is created, but I don't know from where can I access to it. This is my urls.py from django.conf.urls import patterns, include, url from django.conf import…
NeoVe
  • 3,857
  • 8
  • 54
  • 134
1
vote
2 answers

Django 1.6: name 'Sitemap' is not defined

I'm stuck into this issue on Django 1.6 This is my sitemaps.py from django.contrib import sitemaps from django.core.urlresolvers import reverse from datetime import datetime class ContratalosSitemap(Sitemap): def __init__(self, names): …
NeoVe
  • 3,857
  • 8
  • 54
  • 134
1
vote
1 answer

Creating sitemap for more than 50000 urls in Django

I have around 60000 URLs in my sitemap and the number keep growing by 5000 every day. Google recommends to have only 50K urls in one sitemap, and if the number exceeds, then create another sitemap. So, currently I have following code for sitemap…
vaibhav1312
  • 863
  • 4
  • 13
  • 31
1
vote
2 answers

Remove pages from sitemap

I'm using the Django Cms 2.3.5 and I was generating the sitemap like this article from the docs Now my question is there a easy solution to hide two pages from this sitemap because. I have the 404 and the 500 error in my CMS integrated and I dont…
Azd325
  • 5,752
  • 5
  • 34
  • 57
0
votes
0 answers

How to generate different sitemap for public schema and rest of the tenants using the Django sitemap framework for a django_tenants project?

I am using django_tenants and I am planning to use Django sites framework to create sitemap for each of the tenant and the public schema. But the public schema shall have a different sitemap since its apps are different than that of the tenants. How…
0
votes
1 answer

Django Sitemap is not working gives error "Reverse for 'index' not found. 'index' is not a valid view function or pattern name."

I'm trying to implement a Sitemap for my app and I get the error "Reverse for 'index' not found. 'index' is not a valid view function or pattern name." even though these views are set up. What could cause this? I have no problem with dynamic…
fnuff
  • 69
  • 2
  • 9
0
votes
0 answers

Dynamic Sitemap Django for not use model and only use api

Please help me. I am developing odoo ecommerce project. I use frontend with Django framework and backend with python. I give api from backend to Django frontend. Please let me know how to write dynamic sitemap. I am not have model to import and only…
0
votes
1 answer

sitemap.xml works on development but 404 errors on production

I've been following the documentation to add a sitemap to my website, everything works perfectly on development, once I upload to production, I have 404 errors as in sitemap can't be found. I checked the database on production to make sure the…
LinusTux
  • 26
  • 8
0
votes
0 answers

Django sitemap i18n repeats default language, doesn't include urls for non-default languages

Using Django 4.0.6, I have sitemaps working fine for a single default language - English. After adding i18n, the sitemap isn't showing the URLs for other languages, but instead repeats the English URL, whilst labeling it as a URL for the other…
John
  • 949
  • 1
  • 9
  • 20
0
votes
1 answer

sitemaps returns NoReverseMatch at /sitemap.xml

I'm trying to add sitemaps in my application, but when i add a url that has slug, it throws me an error in http://127.0.0.1:8000/sitemap.xml Reverse for 'view-Question' with no arguments not found. 1 pattern(s) tried:…
user19255291