{ "info": { "author": "Artur Barseghyan", "author_email": "artur.barseghyan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============\ndjango-qartez\n=============\nThis app aims to provide the missing XML sitemapsf for Django. At the moment\nthe following XML sitemaps are implemented:\n\n- `qartez.sitemaps.ImagesSitemap`: XML images sitemaps according to the `specs\n `__.\n\n- `qartez.sitemaps.StaticSitemap`: Sitemap for service pages. Add named\n patterns or URLs to the sitemap to have it nicely displayed in a separate\n service XML sitemap.\n\n- `qartez.sitemaps.RelAlternateHreflangSitemap`: Sitemaps: rel=\"alternate\"\n hreflang=\"x\" implementation. Read the `specs\n `__.\n\nPrerequisites\n=============\n- Django: 1.8, 1.9, 1.10, 1.11\n- Python: 2.7, 3.4, 3.5, 3.6\n\nInstallation\n============\n1. Install\n----------\nLatest stable version on PyPI:\n\n.. code-block:: sh\n\n pip install django-qartez\n\nLatest stable version from bitbucket:\n\n.. code-block:: sh\n\n pip install -e hg+http://bitbucket.org/barseghyanartur/django-qartez@stable#egg=django-qartez\n\nLatest stable version from github:\n\n.. code-block:: sh\n\n pip install -e git+https://github.com/barseghyanartur/django-qartez@stable#egg=django-qartez\n\n2. Add `qartez` to your `INSTALLED_APPS`\n----------------------------------------\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n # ...\n 'django.contrib.sitemaps',\n 'qartez',\n # ...\n )\n\nUsage and examples\n==================\nWe have an imaginary foo app.\n\nThe full source code of the example below `here\n`_ (see the\n`example` directory).\n\nfoo/sitemap.py\n--------------\n.. code-block:: python\n\n from django.contrib.sitemaps import Sitemap\n\n from qartez.sitemaps import (\n ImagesSitemap, StaticSitemap, RelAlternateHreflangSitemap\n )\n\n from foo.models import FooItem\n\n # ---------------------- XML images sitemap part ---------------------------\n # Dictionary to feed to the images sitemap.\n foo_item_images_info_dict = {\n # Base queryset to iterate when procuding a site map\n 'queryset': FooItem._default_manager.exclude(image=None),\n 'image_location_field': 'image_url', # Image location (URL)\n 'image_title_field': 'title', # Image title\n # An absolute URL of the page where image is shown\n 'location_field': 'get_absolute_url'\n }\n\n # XML images sitemap.\n foo_item_images_sitemap = {\n 'foo_item_images': ImagesSitemap(foo_item_images_info_dict,\n priority=0.6),\n }\n\n # ---------------------- Static sitemap part ---------------------------\n # Sitemap for service pages like welcome and feedback.\n foo_static_sitemap = StaticSitemap(priority=0.1, changefreq='never')\n foo_static_sitemap.add_named_pattern('foo.welcome')\n foo_static_sitemap.add_named_pattern('foo.contact')\n\n # ---------------------- Normal sitemap part ---------------------------\n # Normal Foo items sitemap.\n class FooItemSitemap(Sitemap):\n changefreq = \"weekly\"\n priority = 1.0\n\n def location(self, obj):\n return obj.get_absolute_url()\n\n def lastmod(self, obj):\n return obj.date_published\n\n def items(self):\n return FooItem._default_manager.all()\n\n # ---------------------- Alternate hreflang sitemap part ---------------\n # Alternate hreflang sitemap.\n class ArticleSitemap(RelAlternateHreflangSitemap):\n # If you want to serve the links on HTTPS.\n protocol = 'https'\n\n def alternate_hreflangs(self, obj):\n return [('en-us', obj.alternative_object_url),]\n\n def items(self):\n return FooItem._default_manager.all()\n\nurls.py\n-------\n.. code-block:: python\n\n from foo.sitemap import foo_item_images_sitemap, foo_static_sitemap\n from foo.sitemap import FooItemAlternateHreflangSitemap, FooItemSitemap\n\n sitemaps = {\n 'foo-items': FooItemSitemap,\n 'foo-items-alternate-hreflang': FooItemAlternateHreflangSitemap,\n 'foo-static': foo_static_sitemap\n }\n\n urlpatterns = patterns('',\n # Sitemaps\n (r'^sitemap\\.xml$', 'django.contrib.sitemaps.views.index', \\\n {'sitemaps': sitemaps}),\n\n (r'^sitemap-foo-images\\.xml$', 'qartez.views.render_images_sitemap', \\\n {'sitemaps': foo_item_images_sitemap}),\n )\n\nNote, that it's necessary to add the\n'template_name': 'qartez/rel_alternate_hreflang_sitemap.xml'\nonly in case if you are going to use the ``qartez.RelAlternateHreflangSitemap``.\n\n.. code-block:: python\n\n (\n r'^sitemap-(?P
.+)\\.xml$',\n 'django.contrib.sitemaps.views.sitemap',\n {\n 'sitemaps': sitemaps,\n 'template_name': 'qartez/rel_alternate_hreflang_sitemap.xml'\n }\n ),\n\nIn order to just get a better idea what kind of models and views are given in\nthe example, see the code parts below.\n\nfoo/models.py\n-------------\n.. code-block:: python\n\n class FooItem(models.Model):\n title = models.CharField(_(\"Title\"), max_length=100)\n slug = models.SlugField(_(\"Slug\"), unique=True)\n body = models.TextField(_(\"Body\"))\n date_published = models.DateTimeField(_(\"Date published\"), blank=True,\n null=True,\n default=datetime.datetime.now())\n\n # Image to be used for XML images sitemap.\n image = models.ImageField(_(\"Headline image\"), blank=True, null=True,\n upload_to='foo-images')\n\n # URL to be used for alternative hreflang attribute.\n alternative_url = models.URLField(_(\"Alternative URL\"), blank=True,\n null=True)\n\n class Meta:\n verbose_name = _(\"Foo item\")\n verbose_name_plural = _(\"Foo items\")\n\n def __unicode__(self):\n return self.title\n\n def get_absolute_url(self):\n kwargs = {'slug': self.slug}\n return reverse('foo.detail', kwargs=kwargs)\n\n # Shortcut to full image URL for XML images sitemap.\n def image_url(self):\n return self.image.url if self.image else ''\n\nfoo/views.py\n------------\n.. code-block:: python\n\n # Service welcome page\n def welcome(request, template_name='foo/welcome.html'):\n context = {}\n return render_to_response(template_name, context, \\\n context_instance=RequestContext(request))\n\n # Service contact page\n def contact(request, template_name='foo/contact.html'):\n context = {}\n return render_to_response(template_name, context, \\\n context_instance=RequestContext(request))\n\nfoo/urls.py\n-----------\n.. code-block:: python\n\n urlpatterns = patterns('foo.views',\n # ...\n # Contact URL\n url(r'^contact/$', view='contact', name='foo.contact'),\n # ...\n # Welcome URL\n url(r'^welcome/$', view='welcome', name='foo.welcome'),\n # ...\n )\n\nLicense\n=======\nGPL 2.0/LGPL 2.1\n\nSupport\n=======\nFor any issues contact me at the e-mail given in the `Author`_ section.\n\nAuthor\n======\nArtur Barseghyan \n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/barseghyanartur/django-qartez", "keywords": "xml sitemaps", "license": "GPL 2.0/LGPL 2.1", "maintainer": "", "maintainer_email": "", "name": "django-qartez", "package_url": "https://pypi.org/project/django-qartez/", "platform": "", "project_url": "https://pypi.org/project/django-qartez/", "project_urls": { "Homepage": "https://bitbucket.org/barseghyanartur/django-qartez" }, "release_url": "https://pypi.org/project/django-qartez/0.7.1/", "requires_dist": null, "requires_python": "", "summary": "Additional XML sitemap functionality for Django", "version": "0.7.1" }, "last_serial": 3472152, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "a494bee3ca682debed246bad72ac951e", "sha256": "a0c2e9c8f85c0515ecc66f166b03a5fdba7e288beb5b7d52c9780a4cccaa967d" }, "downloads": -1, "filename": "django-qartez-0.3.tar.gz", "has_sig": false, "md5_digest": "a494bee3ca682debed246bad72ac951e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9089, "upload_time": "2013-07-02T22:09:01", "url": "https://files.pythonhosted.org/packages/d8/60/1fd6ce2946ebd9e2a5887065f764cb1d2491a7f9eeb45865366cb963f87d/django-qartez-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "85cbd297ea2465f1cc5e5461fb755528", "sha256": "431834871a9732d7bdd003facb89c50898169b0ad1e73ffa0b86fe75bcbd4926" }, "downloads": -1, "filename": "django-qartez-0.4.tar.gz", "has_sig": false, "md5_digest": "85cbd297ea2465f1cc5e5461fb755528", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9277, "upload_time": "2013-09-02T20:08:26", "url": "https://files.pythonhosted.org/packages/54/d9/439e5e0fef0bf7795bdbefb5ac76bf5b6d18153cedc26fd3b842c2307856/django-qartez-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "defde60f17611b8811fe19e55875e96c", "sha256": "e0cb40fec780a6524192b776bd6516ddecc4f595c8a222da83a913a7d006b5d0" }, "downloads": -1, "filename": "django-qartez-0.5.tar.gz", "has_sig": false, "md5_digest": "defde60f17611b8811fe19e55875e96c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8606, "upload_time": "2013-09-09T19:51:19", "url": "https://files.pythonhosted.org/packages/78/5d/c8b2081a7da31595ba1ac0c73e62d2881fc838656f3509db3ee9e46e0321/django-qartez-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "7363ecc32365ac9c5baa96801d426a41", "sha256": "cb5664019a687cbf40a5e4735bb11fc79327d3ad4ba6f07d2fd8dd4eb1b5be44" }, "downloads": -1, "filename": "django-qartez-0.6.tar.gz", "has_sig": false, "md5_digest": "7363ecc32365ac9c5baa96801d426a41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9047, "upload_time": "2014-10-20T07:22:24", "url": "https://files.pythonhosted.org/packages/28/fc/89c365cecbbaba1294f24f7f1690a48fa92a182ac1f29ae7798bacc0f760/django-qartez-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "1329fe20ef61f441961546fb0140cc34", "sha256": "6a33f627826cb77b469276840d07e65c8c4fc4a5484e5218fc9ebbb4c61a09c3" }, "downloads": -1, "filename": "django_qartez-0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1329fe20ef61f441961546fb0140cc34", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 16782, "upload_time": "2017-11-27T22:48:10", "url": "https://files.pythonhosted.org/packages/1f/6f/76360cfef7107c6b1bfceb13797118976ddb50da76f5c1490676940f3275/django_qartez-0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d8ff33ca502f408e8f9b3956fa0bc5a", "sha256": "358bbcbb1e64ce7cd9b25930695da97167ee8cd55565c623f5ec367bb842a83d" }, "downloads": -1, "filename": "django-qartez-0.7.tar.gz", "has_sig": false, "md5_digest": "1d8ff33ca502f408e8f9b3956fa0bc5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10304, "upload_time": "2017-11-27T22:48:07", "url": "https://files.pythonhosted.org/packages/e2/70/76226c2fec18b0e539c83f471c4b85f919d6bb4c0bfdb415c907b659f93c/django-qartez-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "4e9463ff08154ab6152b399c1ce63b05", "sha256": "4871f2e5a3ec35ef71d592ab1efcb29dc604e5f2f40d439d79be6e8aa5af1fa4" }, "downloads": -1, "filename": "django_qartez-0.7.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4e9463ff08154ab6152b399c1ce63b05", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 16849, "upload_time": "2017-11-27T22:57:42", "url": "https://files.pythonhosted.org/packages/fc/c5/f780059822afd1444f7147cd2a57d45e87414a7091e2287ec74382394bea/django_qartez-0.7.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "743192b4e34556e3d02a0717cd7826d8", "sha256": "9cc4339d4d073ac03b1378e5d5d062df15a11b33e7dd02456999dac3c9dbd14c" }, "downloads": -1, "filename": "django-qartez-0.7.1.tar.gz", "has_sig": false, "md5_digest": "743192b4e34556e3d02a0717cd7826d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10357, "upload_time": "2017-11-27T22:57:39", "url": "https://files.pythonhosted.org/packages/aa/81/20c96bd455144f41c1a372b9818a372e1442d855747c79a701d6d717cad3/django-qartez-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4e9463ff08154ab6152b399c1ce63b05", "sha256": "4871f2e5a3ec35ef71d592ab1efcb29dc604e5f2f40d439d79be6e8aa5af1fa4" }, "downloads": -1, "filename": "django_qartez-0.7.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4e9463ff08154ab6152b399c1ce63b05", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 16849, "upload_time": "2017-11-27T22:57:42", "url": "https://files.pythonhosted.org/packages/fc/c5/f780059822afd1444f7147cd2a57d45e87414a7091e2287ec74382394bea/django_qartez-0.7.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "743192b4e34556e3d02a0717cd7826d8", "sha256": "9cc4339d4d073ac03b1378e5d5d062df15a11b33e7dd02456999dac3c9dbd14c" }, "downloads": -1, "filename": "django-qartez-0.7.1.tar.gz", "has_sig": false, "md5_digest": "743192b4e34556e3d02a0717cd7826d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10357, "upload_time": "2017-11-27T22:57:39", "url": "https://files.pythonhosted.org/packages/aa/81/20c96bd455144f41c1a372b9818a372e1442d855747c79a701d6d717cad3/django-qartez-0.7.1.tar.gz" } ] }