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

Django siteframework, How often django create sitemap.xml file?

I have a Django siteframework to create dynamic sitemap.xml sheet. class NewsSitemap(Sitemap): changefreq = "daily" priority = 0.8 protocol = 'https' def items(self): return News.objects.all() # news objects def…
anoop
  • 47
  • 1
  • 1
  • 5
0
votes
1 answer

Dynamic queryset in django sitemap

I have more than 100,000,000 page URLs, how can I make the QuerySet be dynamic in the sense that each class will have 10,000 unique URLs without manually creating the integers in 10,000 classes? # sitemap.py account_ from django.contrib.sitemaps…
0
votes
2 answers

Django – remove the trailing slash from 'sitemap.xml/'

I am using Django's sitemap framework and have a sitemap index. My urls file looks like this: urls = [ path('', include('movies.urls')), path('', include('accounts.urls')), ... path('admin/', admin.site.urls), ] urlpatterns =…
Edmond
  • 59
  • 2
  • 15
0
votes
1 answer

Django - Sitemap - Manually set absolute urls

I'm generating a sitemap but the website that this sitemap is for has a different URL routing and a different domain. I thought that overriding location method will work but the problem is that Django automatically adds Site url before each…
Milano
  • 18,048
  • 37
  • 153
  • 353
0
votes
1 answer

How to add Trailing slash (/) in url of sitemap Django?

I want to add (/) in site map of Django. I have used following code to generate sitemap in django my url.py is from django.contrib.sitemaps.views import sitemap from myApp.sitemaps import staticSitemap , mySitemap sitemaps =…
0
votes
1 answer

Page not found (404) error while searching through search page Raised by: blog.views.blogpost

i am unable to search and get 404 error same problem occur in sitemap views for creating static xml file, it does not return the url for static file and now have this problem with search as it is unable to find search .html gives this Page not found…
0
votes
0 answers

How to integrate sitemaps to django-oscar?

I want to integrate sitemaps for my oscar project and I used django-sitemaps package I followed the same, created an app called sitemaps-django, configured views.py, sitemaps-django/pages/sitemaps.py, URLconf in main urls.py file Views.py from…
0
votes
1 answer

Prepend WWW to sitemap Django

My urls are without WWW, how do I add it? https://website.com/t/483/ daily I use the Django sitemaps. Since I force www on all my website I have the following in my settings,py PREPEND_WWW =…
Sharpless512
  • 3,062
  • 5
  • 35
  • 60
0
votes
1 answer

How to decrease result amount in django sitemap index

According to the django site, when using django sitemap index, once results are over 50,000 entries a new sitemap is paginated and created. The problem is that 50,000 is crushing my system, even with caching. How can I decrease the sitemap entries…
Atma
  • 29,141
  • 56
  • 198
  • 299
0
votes
0 answers

Django Sitemaps Not Showing My Blogposts

I'm using the Django Sitemap Framework. You can see my sitemap here: https://dealmazing.com/sitemap.xml It seems to be picking up my blog at /blog but not my actual blog posts. it looks like it is recording the actual posts over and over again as…
John Rogerson
  • 1,153
  • 2
  • 19
  • 51
0
votes
1 answer

how to add cms.urls integrated in my django application to sitemap.xml

I have this in my django project. In views.py: class MediatorViewSitemap(Sitemap): changefreq = 'monthly' priority = 0.8 def items(self): return Mediator.objects.exclude(photo='') def lastmod(self, obj): return…
Omar
  • 1
0
votes
1 answer

Adding a sitemap to 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 in my urls file I have the following: from django.conf.urls import…
Keith Riches
  • 63
  • 1
  • 8
0
votes
2 answers

django error no module named urls after sitemaps installation

I'm getting the following error: File "/mysite/urls.py" in 7. from commerce.sitemaps import CommerceSitemap File "/mysite/sitemaps.py" in 3. from django.urls import reverse Exception Type: ImportError at / Exception Value: No module named…
Atma
  • 29,141
  • 56
  • 198
  • 299
0
votes
0 answers

Django Sitemaps using incorrect timezone

To sum up the issue - django sitemaps seems to be using the incorrect timezone when processing dates which make up my urls. 1.) The data in the model: fixture_datetime = 2016-04-03 06:15:00 2.) timezone in settings - TIME_ZONE =…
purchas
  • 349
  • 7
  • 19
0
votes
1 answer

TypeError: object() takes no parameters - trying to implement a sitemap

I am going through the Hellowebapp-tutorial, but then an error occurred when I tried to implement a sitemap to my web app. Here is my sitemap.py-file: import datetime from django.contrib.sitemaps import Sitemap from django.core.urlresolvers import…
DBE7
  • 766
  • 2
  • 9
  • 23