Skip to main content

JSL Django Sitemap is a Django app to which iterates over all the url patterns in your main Django project and creates a ready to use sitemap. The sitemap.xml is useful in crawlers such as Google, Bing, Yahoo. We hope you like our app! Leave a star on our github repository. Thanks!

Project description

JSL Django Sitemap

JSL Django Sitemap is a Django utility which iterates over all the url patterns in your main Django project and creates a ready to use sitemap. The sitemap.xml is useful in crawlers such as Google, Bing, Yahoo. We hope you like our app! Leave a star on our GitHub repository. Thanks!

Our Home page JSoftwareLabs.com

Installation

You can install the JSLFireBaseUtils from PyPI:

pip install jsl_django_sitemap

Example Usage

Add necessary imports

from jsl_django_sitemap.views import sitemaps
from django.contrib.sitemaps.views import sitemap
from django.urls import path

In your main django project urls.py file add below in urlpatterns

path('sitemap.xml', sitemap, {'sitemaps': sitemaps},
	 name='django.contrib.sitemaps.views.sitemap'),

In your main settings.py file dd below

JSL_DJANGO_SITEMAP_SETTINGS = {
	"ENABLE": True,
	"INCLUDE_APPS": ("ALL",)
}

# "ALL" means to include all the urls
# if you want specific apps to be included in sitemap use below. Provide comma separated tuple containing your app name
# "INCLUDE_APPS": ("myapp1","myapp2")

View generated sitemap:

Start the development server and visit http://127.0.0.1:8000/sitemap.xml


Current Releases

1.0.4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsl_django_sitemap-1.0.4.tar.gz (4.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page