jsl-django-sitemap


Namejsl-django-sitemap JSON
Version 1.2.4 PyPI version JSON
download
home_pagehttps://github.com/JSoftwareLabs/jsl_django_sitemap
SummaryJSL 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!
upload_time2023-04-22 13:06:07
maintainer
docs_urlNone
authorJSoftwareLabs.com
requires_python
licenseMIT
keywords django sitemap jsoftwarelabs sitemap.xml django automated sitemaps
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # JSL Django Sitemap

[![Upload Python Package](https://github.com/JSoftwareLabs/jsl_django_sitemap/actions/workflows/python-publish.yml/badge.svg)](https://github.com/JSoftwareLabs/jsl_django_sitemap/actions/workflows/python-publish.yml)
---
A sitemap is an XML file on your website that tells search-engine crawlers or 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.

This Django sitemap framework library automates the creation of this XML file by letting you express this information in Python code. You have the ability to chnge and mention settings in your Django project's settings.py file. It is very convinent and easy to use library which detects the changes in your Django url configuration and reloads the new configuration making absolutely no manual interventions for your sitemap.

JSL Django Sitemap is a sitemap.xml creator for Django projects 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](https://www.jsoftwarelabs.com/)

## Installation

You can install the JSL Django Sitemap from [PyPI](https://pypi.org/project/jsl-django-sitemap/):

    pip install jsl-django-sitemap

---

# Example Usage

Add necessary imports
---

```python
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
---

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

In your main settings.py file add below
---

```python

JSL_DJANGO_SITEMAP_SETTINGS = {
	"ENABLE": True,
	"FETCH_URL_FROM": "pattern",
	"INCLUDE_APPS": ("ALL",),
	"IGNORE_URL_PATTERNS": (".*/api/v1.*", )
}

```

# add django built in sitemap in the INSTALLED_APPS

```python
INSTALLED_APPS = [
	# ...
	'django.contrib.sitemaps',
]
```

> **_NOTE:_**
> 1. "ALL" means to include all the urls
> 2. If you want specific apps to be included in sitemap use below. Provide comma separated tuple containing your app name
> 3. "INCLUDE_APPS": ("myapp1","myapp2")
> 4. FETCH_URL_FROM: should be one value from the list ["name", "pattern"]
> 5. default for FETCH_URL_FROM is "pattern"
> 6. By default, if pattern is provided then "^" prefix and "$" suffix in urlpattern is removed.
> 7. "IGNORE_URL_PATTERNS": (".*/api/v1.*", ) This flag is used to ignore certain urls matching the provided tuple of patterns which are regex compatible
**_NOTE:_**
The sitemap application doesn't install any database tables. The only reason it needs to go into INSTALLED_APPS is so that the Loader() template loader can find the default templates.

## View generated sitemap:

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

-----

## Current Releases

[1.2.4](https://github.com/JSoftwareLabs/jsl_django_sitemap/releases/tag/1.2.4)

## How to build and distribute using sdist setup.py and twine

```bash
python3 -m pip install --upgrade twine
python setup.py sdist
twine upload dist/*
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JSoftwareLabs/jsl_django_sitemap",
    "name": "jsl-django-sitemap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Django sitemap,JSoftwareLabs,sitemap.xml,Django automated sitemaps",
    "author": "JSoftwareLabs.com",
    "author_email": "info@jsoftwarelabs.com",
    "download_url": "https://files.pythonhosted.org/packages/07/05/e0d168b85a311d377e2fd86ccfc69728ff1bbce070d7e97c93be943ae15d/jsl_django_sitemap-1.2.4.tar.gz",
    "platform": null,
    "description": "# JSL Django Sitemap\n\n[![Upload Python Package](https://github.com/JSoftwareLabs/jsl_django_sitemap/actions/workflows/python-publish.yml/badge.svg)](https://github.com/JSoftwareLabs/jsl_django_sitemap/actions/workflows/python-publish.yml)\n---\nA sitemap is an XML file on your website that tells search-engine crawlers or indexers how frequently your pages change and how \u201cimportant\u201d certain pages are in relation to other pages on your site. This information helps search engines index your site.\n\nThis Django sitemap framework library automates the creation of this XML file by letting you express this information in Python code. You have the ability to chnge and mention settings in your Django project's settings.py file. It is very convinent and easy to use library which detects the changes in your Django url configuration and reloads the new configuration making absolutely no manual interventions for your sitemap.\n\nJSL Django Sitemap is a sitemap.xml creator for Django projects which iterates over all the url patterns in your main\nDjango project and creates a ready to use sitemap. The sitemap.xml is useful in crawlers such as Google, Bing, Yahoo. We\nhope you like our app! Leave a star on our GitHub repository. Thanks!\n\n# Our Home page [JSoftwareLabs.com](https://www.jsoftwarelabs.com/)\n\n## Installation\n\nYou can install the JSL Django Sitemap from [PyPI](https://pypi.org/project/jsl-django-sitemap/):\n\n    pip install jsl-django-sitemap\n\n---\n\n# Example Usage\n\nAdd necessary imports\n---\n\n```python\nfrom jsl_django_sitemap.views import sitemaps\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.urls import path\n\n```\n\nIn your main django project urls.py file add below in urlpatterns\n---\n\n```python\npath('sitemap.xml', sitemap, {'sitemaps': sitemaps},\nname='django.contrib.sitemaps.views.sitemap'),\n```\n\nIn your main settings.py file add below\n---\n\n```python\n\nJSL_DJANGO_SITEMAP_SETTINGS = {\n\t\"ENABLE\": True,\n\t\"FETCH_URL_FROM\": \"pattern\",\n\t\"INCLUDE_APPS\": (\"ALL\",),\n\t\"IGNORE_URL_PATTERNS\": (\".*/api/v1.*\", )\n}\n\n```\n\n# add django built in sitemap in the INSTALLED_APPS\n\n```python\nINSTALLED_APPS = [\n\t# ...\n\t'django.contrib.sitemaps',\n]\n```\n\n> **_NOTE:_**\n> 1. \"ALL\" means to include all the urls\n> 2. If you want specific apps to be included in sitemap use below. Provide comma separated tuple containing your app name\n> 3. \"INCLUDE_APPS\": (\"myapp1\",\"myapp2\")\n> 4. FETCH_URL_FROM: should be one value from the list [\"name\", \"pattern\"]\n> 5. default for FETCH_URL_FROM is \"pattern\"\n> 6. By default, if pattern is provided then \"^\" prefix and \"$\" suffix in urlpattern is removed.\n> 7. \"IGNORE_URL_PATTERNS\": (\".*/api/v1.*\", ) This flag is used to ignore certain urls matching the provided tuple of patterns which are regex compatible\n**_NOTE:_**\nThe sitemap application doesn't install any database tables. The only reason it needs to go into INSTALLED_APPS is so that the Loader() template loader can find the default templates.\n\n## View generated sitemap:\n\nStart the development server and visit http://127.0.0.1:8000/sitemap.xml\n\n-----\n\n## Current Releases\n\n[1.2.4](https://github.com/JSoftwareLabs/jsl_django_sitemap/releases/tag/1.2.4)\n\n## How to build and distribute using sdist setup.py and twine\n\n```bash\npython3 -m pip install --upgrade twine\npython setup.py sdist\ntwine upload dist/*\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "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!",
    "version": "1.2.4",
    "split_keywords": [
        "django sitemap",
        "jsoftwarelabs",
        "sitemap.xml",
        "django automated sitemaps"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6fdbeac1e409e136852a8e666a20215385dc7514e3f2afa8b17f0595ddc0d7c0",
                "md5": "1915056f6923d4d6bedeff4aab5b43b1",
                "sha256": "bc565cee800b97a1c9f19dd1c329c9e8956bf8d6b4499cfa4ada7aaa61945098"
            },
            "downloads": -1,
            "filename": "jsl_django_sitemap-1.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1915056f6923d4d6bedeff4aab5b43b1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7036,
            "upload_time": "2023-04-22T13:06:05",
            "upload_time_iso_8601": "2023-04-22T13:06:05.293936Z",
            "url": "https://files.pythonhosted.org/packages/6f/db/eac1e409e136852a8e666a20215385dc7514e3f2afa8b17f0595ddc0d7c0/jsl_django_sitemap-1.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0705e0d168b85a311d377e2fd86ccfc69728ff1bbce070d7e97c93be943ae15d",
                "md5": "7df96998c9af25ac6314ce6c4fd53038",
                "sha256": "0a4468fe8f9a6d1604257759940fb3776568c4d4fcb18bca8ad5ab7440495d2d"
            },
            "downloads": -1,
            "filename": "jsl_django_sitemap-1.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "7df96998c9af25ac6314ce6c4fd53038",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6201,
            "upload_time": "2023-04-22T13:06:07",
            "upload_time_iso_8601": "2023-04-22T13:06:07.671228Z",
            "url": "https://files.pythonhosted.org/packages/07/05/e0d168b85a311d377e2fd86ccfc69728ff1bbce070d7e97c93be943ae15d/jsl_django_sitemap-1.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-22 13:06:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "JSoftwareLabs",
    "github_project": "jsl_django_sitemap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "jsl-django-sitemap"
}
        
Elapsed time: 0.06126s