djangocms-page-sitemap


Namedjangocms-page-sitemap JSON
Version 1.3.0 PyPI version JSON
download
home_pagehttps://github.com/nephila/djangocms-page-sitemap
Summarydjango CMS page extension to handle sitemap customization
upload_time2023-09-26 10:08:21
maintainer
docs_urlNone
authorIacopo Spalletti
requires_python>=3.7
licenseBSD
keywords django cms sitemap django-app-enabler addon
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ======================
djangocms-page-sitemap
======================

|Gitter| |PyPiVersion| |PyVersion| |Status| |TestCoverage| |CodeClimate| |License|

django CMS page extension to handle sitemap customization

Support Python version:

* Python 3.9, 3.10, 3.11

Supported Django versions:

* Django 3.2, 4.1, 4.2

Supported django CMS versions:

* django CMS 3.9, 3.11

.. note:: djangocms-page-sitemap 0.8 has been relicensed with BSD license.

.. note:: djangocms-page-sitemap 1.0 dropped compatibility with Python 2 and  Django < 2.2

********
Features
********

* Support for changefreq and priority customisation per-page
* Option to exclude a page from the Sitemap
* Values are cached
* django CMS toolbar integration
* Available on Divio Cloud


**********
Quickstart
**********

* Install djangocms-page-sitemap::

    pip install djangocms-page-sitemap

* Add to ``INSTALLED_APPS`` with ``django.contrib.sitemaps``:

  .. code-block:: python

        INSTALLED_APPS = [
            ...
            "django.contrib.sitemaps",
            "djangocms_page_sitemap",
        ]

* Load it into the urlconf, eventually removing django CMS sitemap:

  .. code-block:: python

        ...
        urlpatterns = [
            path("admin/", admin.site.urls),
            ...
            path("", include("djangocms_page_sitemap.sitemap_urls")),
            ...
        ]

* Load ``robots_index`` templatetag and add it to the page in the head tag of the django CMS pages (or in a shared base template):

  .. code-block:: html+django

        {% load robots_index %}

        ...
        <head>
        <!-- somewhere in the head tag -->
        {% page_robots %}
        </head>
         ...

* If you need to provide a custom sitemap configuration (for example to add more
  sitemap classes to it, you can append the sitemap url explicitly:

  .. code-block:: python

        from django.contrib.sitemaps.views import sitemap
        from djangocms_page_sitemap.sitemap import ExtendedSitemap
        from myapp.sitemaps import MySiteSitemap

        urlpatterns = [
            ...
            path("sitemap.xml", sitemap, {
                "sitemaps": {
                    "cmspages": ExtendedSitemap, "myapp": MySiteSitemap,
                }
            ),
            ...
        ]


**************************
django-app-enabler support
**************************

`django-app-enabler`_ is supported.

You can either

* Installation & configuration: ``python -mapp_enabler install djangocms-page-meta``
* Autoconfiguration: ``python -mapp_enabler enable djangocms_page_meta``

Fully using this package will require some changes that cannot be modified by ``django-app-enabler``:

* Remove any existing sitemap declaration from ``urls.py``;
* Load robots tags in the page like outlined above;
* Run migrations: ``python manage.py migrate``

Check documentation above for details.

**********
Usage
**********

After installing as above, you will be able to tune the sitemap setting for each page.

A new menu item ``Sitemap properties`` will be available in the page toolbar.

For each page you will be able to set the following flags / values:

* Sitemap changefreq (default: the django CMS default)
* Sitemap priority (default: 0.5)
* Include page in sitemap (default: ``True``)
* Set ``noindex`` value to page robots meta tag
* Set ``noarchive`` value to page robots meta tag
* Provide any additional robots meta tag values

page_robots options
===================

``page_robots`` meta tag accepts the following parameters:

* ``page``: the page to render robots meta tag (default: current page). Can be
  any valid `page lookup`_
* ``site``: the current site id (default: current site).

Settings
===================

* PAGE_SITEMAP_CHANGEFREQ_LIST: List of frequency changes
* PAGE_SITEMAP_DEFAULT_CHANGEFREQ: Default changefrequency (default: django CMS value -monthly-)
* PAGE_SITEMAP_CACHE_DURATION: Cache duration: same as django CMS menu cache)


.. _page lookup: https://docs.django-cms.org/en/reference/templatetags.html#page_lookup
.. _django-app-enabler: https://github.com/nephila/django-app-enabler


.. |Gitter| image:: https://img.shields.io/badge/GITTER-join%20chat-brightgreen.svg?style=flat-square
    :target: https://gitter.im/nephila/applications
    :alt: Join the Gitter chat

.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-page-sitemap.svg?style=flat-square
    :target: https://pypi.python.org/pypi/djangocms-page-sitemap
    :alt: Latest PyPI version

.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-page-sitemap.svg?style=flat-square
    :target: https://pypi.python.org/pypi/djangocms-page-sitemap
    :alt: Python versions

.. |Status| image:: https://img.shields.io/travis/nephila/djangocms-page-sitemap.svg?style=flat-square
    :target: https://travis-ci.org/nephila/djangocms-page-sitemap
    :alt: Latest Travis CI build status

.. |TestCoverage| image:: https://img.shields.io/coveralls/nephila/djangocms-page-sitemap/master.svg?style=flat-square
    :target: https://coveralls.io/r/nephila/djangocms-page-sitemap?branch=master
    :alt: Test coverage

.. |License| image:: https://img.shields.io/github/license/nephila/djangocms-page-sitemap.svg?style=flat-square
   :target: https://pypi.python.org/pypi/djangocms-page-sitemap/
    :alt: License

.. |CodeClimate| image:: https://codeclimate.com/github/nephila/djangocms-page-sitemap/badges/gpa.svg?style=flat-square
   :target: https://codeclimate.com/github/nephila/djangocms-page-sitemap
   :alt: Code Climate

.. :changelog:

*******
History
*******

.. towncrier release notes start

1.3.0 (2023-09-26)
==================

Features
--------

- Migrate to bump-my-version (#96)


1.2.0 (2023-05-08)
==================

Features
--------

- Update GH actions / linting configuration (#79)
- Add support for Django 4.2 / django CMS 3.11


1.1.0 (2022-08-27)
==================

Bugfixes
--------

- Fix error when populating the toolbar on page types (#67)
- Fixed serialization issue when trying to upload the addon to Divio Cloud. (#73)
- Add support for Django 3.2 / django CMS 3.10 (#74)


1.0.0 (2020-12-21)
==================

Features
--------

- Add support for django-app-enabler (#63)
- Update tooling and drop Python 2 / Django < 2.2 compatibility (#10208)

0.8.1 (2020-05-02)
==================

* Enable django CMS 3.7.2 on python 3

0.8.0 (2020-01-12)
==================

* Relicense under BSD license

0.7.0 (2019-08-22)
==================

* Add compatibility with Django 2.2
* Drop compatibility with Django < 1.11
* Drop compatibility with django CMS < 3.6
* Move to django-app-helper

0.6.0 (2019-07-13)
==================

* Drop compatibility with Django < 1.11
* Drop compatibility with Python 3 < 3.5

0.5.4 (2019-07-13)
==================

* Fix error when page_robots is executed outside a request
* Fix tox for older environments

0.5.3 (2019-03-09)
==================

* Add Django 2.0, 2.1 support
* Add django CMS 3.6 support
* Apply workaround to avoid triggering ``Page.site_id`` deprecation warning

0.5.2 (2018-04-07)
==================

* Make robots_extra not required

0.5.1 (2018-02-27)
==================

* Fix error in migration dependencies

0.5.0 (2018-02-22)
==================

* Add Django 1.11 support
* Add django CMS 3.5 support
* Package as Divio Cloud addon
* Add support for noindex, noarchive robots meta tag

0.4.3 (2019-07-13)
==================

* Fix error when page_robots is executed outside a request
* Fix tox for older environments

0.4.2 (2019-04-08)
==================

* Add support for noindex, noarchive robots meta tag

0.4.1 (2016-12-02)
==================

* Add Django 1.10 support

0.4.0 (2016-10-26)
==================

* Drop compatibility with django CMS 3.1 and below, Django 1.7 and below

0.3.1 (2015-10-18)
==================

* Improve defaults

0.3.0 (2015-10-18)
==================

* Add Python 3.5
* Add option to exclude page from sitemap

0.2.0 (2015-08-15)
==================

* Update to support django CMS 3.1
* Drop support for Django 1.4, 1.5
* Add support for Django 1.8

0.1.0 (2014-08-26)
==================

* Initial version.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nephila/djangocms-page-sitemap",
    "name": "djangocms-page-sitemap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "django cms,sitemap,django-app-enabler addon",
    "author": "Iacopo Spalletti",
    "author_email": "i.spalletti@nephila.digital",
    "download_url": "https://files.pythonhosted.org/packages/3e/20/38d1613e0ce26c81d040dace826338512c31f4a211d8d541dae7fdfbbb19/djangocms-page-sitemap-1.3.0.tar.gz",
    "platform": null,
    "description": "======================\ndjangocms-page-sitemap\n======================\n\n|Gitter| |PyPiVersion| |PyVersion| |Status| |TestCoverage| |CodeClimate| |License|\n\ndjango CMS page extension to handle sitemap customization\n\nSupport Python version:\n\n* Python 3.9, 3.10, 3.11\n\nSupported Django versions:\n\n* Django 3.2, 4.1, 4.2\n\nSupported django CMS versions:\n\n* django CMS 3.9, 3.11\n\n.. note:: djangocms-page-sitemap 0.8 has been relicensed with BSD license.\n\n.. note:: djangocms-page-sitemap 1.0 dropped compatibility with Python 2 and  Django < 2.2\n\n********\nFeatures\n********\n\n* Support for changefreq and priority customisation per-page\n* Option to exclude a page from the Sitemap\n* Values are cached\n* django CMS toolbar integration\n* Available on Divio Cloud\n\n\n**********\nQuickstart\n**********\n\n* Install djangocms-page-sitemap::\n\n    pip install djangocms-page-sitemap\n\n* Add to ``INSTALLED_APPS`` with ``django.contrib.sitemaps``:\n\n  .. code-block:: python\n\n        INSTALLED_APPS = [\n            ...\n            \"django.contrib.sitemaps\",\n            \"djangocms_page_sitemap\",\n        ]\n\n* Load it into the urlconf, eventually removing django CMS sitemap:\n\n  .. code-block:: python\n\n        ...\n        urlpatterns = [\n            path(\"admin/\", admin.site.urls),\n            ...\n            path(\"\", include(\"djangocms_page_sitemap.sitemap_urls\")),\n            ...\n        ]\n\n* Load ``robots_index`` templatetag and add it to the page in the head tag of the django CMS pages (or in a shared base template):\n\n  .. code-block:: html+django\n\n        {% load robots_index %}\n\n        ...\n        <head>\n        <!-- somewhere in the head tag -->\n        {% page_robots %}\n        </head>\n         ...\n\n* If you need to provide a custom sitemap configuration (for example to add more\n  sitemap classes to it, you can append the sitemap url explicitly:\n\n  .. code-block:: python\n\n        from django.contrib.sitemaps.views import sitemap\n        from djangocms_page_sitemap.sitemap import ExtendedSitemap\n        from myapp.sitemaps import MySiteSitemap\n\n        urlpatterns = [\n            ...\n            path(\"sitemap.xml\", sitemap, {\n                \"sitemaps\": {\n                    \"cmspages\": ExtendedSitemap, \"myapp\": MySiteSitemap,\n                }\n            ),\n            ...\n        ]\n\n\n**************************\ndjango-app-enabler support\n**************************\n\n`django-app-enabler`_ is supported.\n\nYou can either\n\n* Installation & configuration: ``python -mapp_enabler install djangocms-page-meta``\n* Autoconfiguration: ``python -mapp_enabler enable djangocms_page_meta``\n\nFully using this package will require some changes that cannot be modified by ``django-app-enabler``:\n\n* Remove any existing sitemap declaration from ``urls.py``;\n* Load robots tags in the page like outlined above;\n* Run migrations: ``python manage.py migrate``\n\nCheck documentation above for details.\n\n**********\nUsage\n**********\n\nAfter installing as above, you will be able to tune the sitemap setting for each page.\n\nA new menu item ``Sitemap properties`` will be available in the page toolbar.\n\nFor each page you will be able to set the following flags / values:\n\n* Sitemap changefreq (default: the django CMS default)\n* Sitemap priority (default: 0.5)\n* Include page in sitemap (default: ``True``)\n* Set ``noindex`` value to page robots meta tag\n* Set ``noarchive`` value to page robots meta tag\n* Provide any additional robots meta tag values\n\npage_robots options\n===================\n\n``page_robots`` meta tag accepts the following parameters:\n\n* ``page``: the page to render robots meta tag (default: current page). Can be\n  any valid `page lookup`_\n* ``site``: the current site id (default: current site).\n\nSettings\n===================\n\n* PAGE_SITEMAP_CHANGEFREQ_LIST: List of frequency changes\n* PAGE_SITEMAP_DEFAULT_CHANGEFREQ: Default changefrequency (default: django CMS value -monthly-)\n* PAGE_SITEMAP_CACHE_DURATION: Cache duration: same as django CMS menu cache)\n\n\n.. _page lookup: https://docs.django-cms.org/en/reference/templatetags.html#page_lookup\n.. _django-app-enabler: https://github.com/nephila/django-app-enabler\n\n\n.. |Gitter| image:: https://img.shields.io/badge/GITTER-join%20chat-brightgreen.svg?style=flat-square\n    :target: https://gitter.im/nephila/applications\n    :alt: Join the Gitter chat\n\n.. |PyPiVersion| image:: https://img.shields.io/pypi/v/djangocms-page-sitemap.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/djangocms-page-sitemap\n    :alt: Latest PyPI version\n\n.. |PyVersion| image:: https://img.shields.io/pypi/pyversions/djangocms-page-sitemap.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/djangocms-page-sitemap\n    :alt: Python versions\n\n.. |Status| image:: https://img.shields.io/travis/nephila/djangocms-page-sitemap.svg?style=flat-square\n    :target: https://travis-ci.org/nephila/djangocms-page-sitemap\n    :alt: Latest Travis CI build status\n\n.. |TestCoverage| image:: https://img.shields.io/coveralls/nephila/djangocms-page-sitemap/master.svg?style=flat-square\n    :target: https://coveralls.io/r/nephila/djangocms-page-sitemap?branch=master\n    :alt: Test coverage\n\n.. |License| image:: https://img.shields.io/github/license/nephila/djangocms-page-sitemap.svg?style=flat-square\n   :target: https://pypi.python.org/pypi/djangocms-page-sitemap/\n    :alt: License\n\n.. |CodeClimate| image:: https://codeclimate.com/github/nephila/djangocms-page-sitemap/badges/gpa.svg?style=flat-square\n   :target: https://codeclimate.com/github/nephila/djangocms-page-sitemap\n   :alt: Code Climate\n\n.. :changelog:\n\n*******\nHistory\n*******\n\n.. towncrier release notes start\n\n1.3.0 (2023-09-26)\n==================\n\nFeatures\n--------\n\n- Migrate to bump-my-version (#96)\n\n\n1.2.0 (2023-05-08)\n==================\n\nFeatures\n--------\n\n- Update GH actions / linting configuration (#79)\n- Add support for Django 4.2 / django CMS 3.11\n\n\n1.1.0 (2022-08-27)\n==================\n\nBugfixes\n--------\n\n- Fix error when populating the toolbar on page types (#67)\n- Fixed serialization issue when trying to upload the addon to Divio Cloud. (#73)\n- Add support for Django 3.2 / django CMS 3.10 (#74)\n\n\n1.0.0 (2020-12-21)\n==================\n\nFeatures\n--------\n\n- Add support for django-app-enabler (#63)\n- Update tooling and drop Python 2 / Django < 2.2 compatibility (#10208)\n\n0.8.1 (2020-05-02)\n==================\n\n* Enable django CMS 3.7.2 on python 3\n\n0.8.0 (2020-01-12)\n==================\n\n* Relicense under BSD license\n\n0.7.0 (2019-08-22)\n==================\n\n* Add compatibility with Django 2.2\n* Drop compatibility with Django < 1.11\n* Drop compatibility with django CMS < 3.6\n* Move to django-app-helper\n\n0.6.0 (2019-07-13)\n==================\n\n* Drop compatibility with Django < 1.11\n* Drop compatibility with Python 3 < 3.5\n\n0.5.4 (2019-07-13)\n==================\n\n* Fix error when page_robots is executed outside a request\n* Fix tox for older environments\n\n0.5.3 (2019-03-09)\n==================\n\n* Add Django 2.0, 2.1 support\n* Add django CMS 3.6 support\n* Apply workaround to avoid triggering ``Page.site_id`` deprecation warning\n\n0.5.2 (2018-04-07)\n==================\n\n* Make robots_extra not required\n\n0.5.1 (2018-02-27)\n==================\n\n* Fix error in migration dependencies\n\n0.5.0 (2018-02-22)\n==================\n\n* Add Django 1.11 support\n* Add django CMS 3.5 support\n* Package as Divio Cloud addon\n* Add support for noindex, noarchive robots meta tag\n\n0.4.3 (2019-07-13)\n==================\n\n* Fix error when page_robots is executed outside a request\n* Fix tox for older environments\n\n0.4.2 (2019-04-08)\n==================\n\n* Add support for noindex, noarchive robots meta tag\n\n0.4.1 (2016-12-02)\n==================\n\n* Add Django 1.10 support\n\n0.4.0 (2016-10-26)\n==================\n\n* Drop compatibility with django CMS 3.1 and below, Django 1.7 and below\n\n0.3.1 (2015-10-18)\n==================\n\n* Improve defaults\n\n0.3.0 (2015-10-18)\n==================\n\n* Add Python 3.5\n* Add option to exclude page from sitemap\n\n0.2.0 (2015-08-15)\n==================\n\n* Update to support django CMS 3.1\n* Drop support for Django 1.4, 1.5\n* Add support for Django 1.8\n\n0.1.0 (2014-08-26)\n==================\n\n* Initial version.\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "django CMS page extension to handle sitemap customization",
    "version": "1.3.0",
    "project_urls": {
        "Documentation": "https://djangocms-page-sitemap.readthedocs.io/",
        "Homepage": "https://github.com/nephila/djangocms-page-sitemap"
    },
    "split_keywords": [
        "django cms",
        "sitemap",
        "django-app-enabler addon"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb72dd2629b9938ccc1153e82b02846772a12748da3a1e631ccaea3e5ebe3dec",
                "md5": "aab61ed5c19d1069b7e5ea81305281d1",
                "sha256": "27c2979b06e7b7230e20bfe8af4a8f6ed4bed374a45ac0744356742d6b561e67"
            },
            "downloads": -1,
            "filename": "djangocms_page_sitemap-1.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aab61ed5c19d1069b7e5ea81305281d1",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 29784,
            "upload_time": "2023-09-26T10:08:19",
            "upload_time_iso_8601": "2023-09-26T10:08:19.878713Z",
            "url": "https://files.pythonhosted.org/packages/eb/72/dd2629b9938ccc1153e82b02846772a12748da3a1e631ccaea3e5ebe3dec/djangocms_page_sitemap-1.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e2038d1613e0ce26c81d040dace826338512c31f4a211d8d541dae7fdfbbb19",
                "md5": "ce60578cda1fc247cc96be97450fb30d",
                "sha256": "32aeba2acc1212299892db0e86cd5364b008ff4428565a5f2cf2f55676c1ba9d"
            },
            "downloads": -1,
            "filename": "djangocms-page-sitemap-1.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ce60578cda1fc247cc96be97450fb30d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 20586,
            "upload_time": "2023-09-26T10:08:21",
            "upload_time_iso_8601": "2023-09-26T10:08:21.641694Z",
            "url": "https://files.pythonhosted.org/packages/3e/20/38d1613e0ce26c81d040dace826338512c31f4a211d8d541dae7fdfbbb19/djangocms-page-sitemap-1.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-26 10:08:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nephila",
    "github_project": "djangocms-page-sitemap",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "djangocms-page-sitemap"
}
        
Elapsed time: 0.91335s