{ "info": { "author": "Matthias Kestenholz", "author_email": "mk@feinheit.ch", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "===============\ndjango-sitemaps\n===============\n\n``sitemap.xml`` generation using lxml_ with support for alternates_. It\nuses Python 3's keyword-only arguments for self-documenting code.\n\n\nInstallation\n============\n\nSimply ``pip install django-sitemaps``. The package consists of a single\npython module, ``django_sitemaps``, containing the single class; there's no\nadditional configuration necessary.\n\n\nUsage\n=====\n\nView::\n\n from app.pages.sitemaps import PagesSitemap\n\n def sitemap(request):\n sitemap = Sitemap(\n # All URLs are passed through build_absolute_uri.\n build_absolute_uri=request.build_absolute_uri,\n )\n\n # URLs can be added one-by-one. The only required argument\n # is the URL. All other arguments are keyword-only arguments.\n for p in Page.objects.active():\n url = p.get_absolute_url()\n sitemap.add(\n url,\n changefreq='weekly',\n priority=0.5,\n lastmod=p.modification_date,\n alternates={\n code: urljoin(domain, url)\n for code, domain in PAGE_DOMAINS[p.language].items()\n },\n )\n\n # Adding conventional Django sitemaps is supported. The\n # request argument is necessary because Django's sitemaps\n # depend on django.contrib.sites, resp. RequestSite.\n sitemap.add_django_sitemap(PagesSitemap, request=request)\n\n # You could get the serialized XML...\n # ... = sitemap.serialize([pretty_print=False])\n # ... or use the ``response`` helper to return a\n # ready-made ``HttpResponse``:\n return sitemap.response(\n # pretty_print is False by default\n pretty_print=settings.DEBUG,\n )\n\nURLconf::\n\n from django_sitemaps import robots_txt\n from app.views import sitemap\n\n urlpatterns = [\n url(r'^sitemap\\.xml$', sitemap),\n url(r'^robots\\.txt$', robots_txt(timeout=86400)),\n ...\n ]\n\nThe ``robots_txt`` function returns a view which can be used to generate\na ``robots.txt`` file containing sitemap URLs. The default sitemap only\ncontains::\n\n User-agent: *\n Sitemap: :///sitemap.xml\n\nThe list of sitemap URLs may be overridden by setting ``sitemaps``::\n\n from django.urls import reverse_lazy\n\n urlpatterns = [\n url(r'^robots\\.txt$', robots_txt(\n timeout=86400,\n sitemaps=[\n '/sitemap.xml',\n reverse_lazy('articles-sitemap'),\n ...,\n ],\n )),\n ]\n\n\n.. _alternates: https://support.google.com/webmasters/answer/2620865?hl=en\n.. _lxml: http://lxml.de/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/matthiask/django-sitemaps/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-sitemaps", "package_url": "https://pypi.org/project/django-sitemaps/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-sitemaps/", "project_urls": { "Homepage": "https://github.com/matthiask/django-sitemaps/" }, "release_url": "https://pypi.org/project/django-sitemaps/1.1.1/", "requires_dist": [ "lxml" ], "requires_python": "", "summary": "", "version": "1.1.1" }, "last_serial": 5877948, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "a54624057cb3d162c05e622ca86c1268", "sha256": "630f589bf319f34b699d0bb3690256750dcaa30ee5adfd9a1a9b4bbdbc991df7" }, "downloads": -1, "filename": "django_sitemaps-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a54624057cb3d162c05e622ca86c1268", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4345, "upload_time": "2017-03-29T15:21:10", "url": "https://files.pythonhosted.org/packages/69/e8/95d10b52adba03fc7d280ec6ba75382a72eab938b915688e87b1b6542066/django_sitemaps-1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a02d5d2f904343597a2052f23cacb7e", "sha256": "e33cd860176835a4bd9ee00bae3c31258da6ddb1fd277a752745c19e36c4c7f1" }, "downloads": -1, "filename": "django-sitemaps-1.0.tar.gz", "has_sig": false, "md5_digest": "3a02d5d2f904343597a2052f23cacb7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3685, "upload_time": "2017-03-29T15:21:13", "url": "https://files.pythonhosted.org/packages/e6/d0/2cd671593be206cfe95f52f402156cb7433597a84b4883a0495c98c1b972/django-sitemaps-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ef0f8c877919e684d2a106f890d43dc1", "sha256": "aba4481d6ba308e8bbfc1240c3f60c7e4c104399506342c6acb9a04a6677b643" }, "downloads": -1, "filename": "django_sitemaps-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ef0f8c877919e684d2a106f890d43dc1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5227, "upload_time": "2017-03-29T16:37:41", "url": "https://files.pythonhosted.org/packages/84/c3/62e985efd99288aa47defd90f334c2805c75f7ab7534b79cf8a303505f8c/django_sitemaps-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c3d29fbe044fb71fedd2981ce18a618", "sha256": "b7fd84cfdd757d20d8dd7b1471f6afec95889e64ede4dad63c50d84e82c3d0ac" }, "downloads": -1, "filename": "django-sitemaps-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6c3d29fbe044fb71fedd2981ce18a618", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4237, "upload_time": "2017-03-29T16:37:43", "url": "https://files.pythonhosted.org/packages/85/a6/ac12c0ff9079aa2d57893bab799eba4a8060ae1dcef962dbb83ba1cf2862/django-sitemaps-1.0.1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "d99a3059ae98fbca600845ec9c3c0565", "sha256": "312f1a9f2c9fbce94f3e8fe08b8665b6506b746d05528c3e7d7fed19b3ad341c" }, "downloads": -1, "filename": "django_sitemaps-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d99a3059ae98fbca600845ec9c3c0565", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5862, "upload_time": "2018-04-11T09:19:32", "url": "https://files.pythonhosted.org/packages/8d/d2/0deefd2a66070f204d2d2da4ca92220866677ad6dc53dadef6359f3138ee/django_sitemaps-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c6ea80ac4e1097fc1b35967231cb178", "sha256": "6ba9b2f55697fd42cead7615fd41100b7d6829102d7f8cdb980ea4e807d8382d" }, "downloads": -1, "filename": "django-sitemaps-1.1.tar.gz", "has_sig": false, "md5_digest": "7c6ea80ac4e1097fc1b35967231cb178", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4766, "upload_time": "2018-04-11T09:19:33", "url": "https://files.pythonhosted.org/packages/3c/48/fdefe2cef9aae689fffe84c2065f192f53f5f7f923cd4398aac4afe20efb/django-sitemaps-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "9840fe47316f7ce670f29d7d9cf2d4d3", "sha256": "8989940cae0c3050166437400677964d62108766bfb482553eacb71a1a7be357" }, "downloads": -1, "filename": "django_sitemaps-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9840fe47316f7ce670f29d7d9cf2d4d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5852, "upload_time": "2019-06-20T15:50:17", "url": "https://files.pythonhosted.org/packages/b7/91/4a64384e3b3617540d322bc4359f1b126a69440c69d394952f38d9dd504e/django_sitemaps-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57a397a9017925a6fec4e75ece34376a", "sha256": "21c571639200ca4504694d30741f2ac98d24090579243bd7197d8f52cfa09722" }, "downloads": -1, "filename": "django-sitemaps-1.1.1.tar.gz", "has_sig": false, "md5_digest": "57a397a9017925a6fec4e75ece34376a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4776, "upload_time": "2019-06-20T15:50:19", "url": "https://files.pythonhosted.org/packages/1b/e3/2e718d7981d5273694c88791e2cfd8df6ae66c67faf7d7e126f783d1148c/django-sitemaps-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9840fe47316f7ce670f29d7d9cf2d4d3", "sha256": "8989940cae0c3050166437400677964d62108766bfb482553eacb71a1a7be357" }, "downloads": -1, "filename": "django_sitemaps-1.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9840fe47316f7ce670f29d7d9cf2d4d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5852, "upload_time": "2019-06-20T15:50:17", "url": "https://files.pythonhosted.org/packages/b7/91/4a64384e3b3617540d322bc4359f1b126a69440c69d394952f38d9dd504e/django_sitemaps-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57a397a9017925a6fec4e75ece34376a", "sha256": "21c571639200ca4504694d30741f2ac98d24090579243bd7197d8f52cfa09722" }, "downloads": -1, "filename": "django-sitemaps-1.1.1.tar.gz", "has_sig": false, "md5_digest": "57a397a9017925a6fec4e75ece34376a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4776, "upload_time": "2019-06-20T15:50:19", "url": "https://files.pythonhosted.org/packages/1b/e3/2e718d7981d5273694c88791e2cfd8df6ae66c67faf7d7e126f783d1148c/django-sitemaps-1.1.1.tar.gz" } ] }