{ "info": { "author": "Maxime Klampas", "author_email": "mklampas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "=========================\ndjango2-url-robots\n=========================\n\nFork of dimka665 https://github.com/dimka665/django-url-robots\n\n``Django`` ``robots.txt`` generator. Based on using decorated ``django.conf.urls.url``.\nIt gets ``urlpatterns`` and replaces ambiguous parts by ``*``.\n\nInstallation & Usage\n=========================\n\nThe recommended way to install django2-url-robots is with `pip `_\n\n1. Install from PyPI with ``easy_install`` or ``pip``::\n\n pip install django2-url-robots\n\n2. Add ``'django2_url_robots'`` to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n ...\n 'django2_url_robots',\n ...\n )\n\n3. Add django2_url_robots view to your root URLconf::\n\n urlpatterns += [\n url(r'^robots\\.txt$', django2_url_robots.views.robots_txt),\n ]\n\n4. Describe rules by boolean keyword argument ``robots_allow`` using for it ``django2_url_robots.utils.url`` instead ``django.conf.urls.url``::\n\n from django2_url_robots.utils import url\n\n urlpatterns += [\n url('^profile/private$', views.some_view, robots_allow=False),\n ]\n\n``django2-url-robots`` tested with ``Django-2.0.5+``. Encodes unicode characters by percent-encoding.\n\nSettings\n====================\n\nIn this moment there are only one option to define template of ``robots.txt`` file::\n\n urlpatterns += [\n url(r'^robots\\.txt$', django2_url_robots.views.robots_txt, {'template': 'my_awesome_robots_template.txt'}),\n ]\n\nExample\n===================\nrobots_template.txt::\n\n User-agent: *\n Disallow: /* # disallow all\n {{ rules|safe }}\n\nurls.py::\n\n from django.conf.urls import include\n\n urlpatterns = [\n url(r'^profile', include('django2_url_robots.tests.urls_profile')),\n ]\n\nurls_profile.py::\n\n from django2_url_robots.utils import url\n\n urlpatterns = [\n url(r'^s$', views.some_view, name='profiles', robots_allow=True),\n url(r'^/(?P\\w+)$', views.some_view),\n url(r'^/(?P\\w+)/private', views.some_view, name='profile_private', robots_allow=False),\n url(r'^/(?P\\w+)/public', views.some_view, name='profile_public', robots_allow=True),\n ]\n\nResulting robots.txt::\n\n User-agent: *\n Disallow: /* # disallow all\n Allow: /profiles$\n Disallow: /profile/*/private*\n Allow: /profile/*/public*\n\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/maximekl/django2-url-robots", "keywords": "", "license": "Python Software Foundation License", "maintainer": "", "maintainer_email": "", "name": "django2-url-robots", "package_url": "https://pypi.org/project/django2-url-robots/", "platform": "any", "project_url": "https://pypi.org/project/django2-url-robots/", "project_urls": { "Homepage": "https://github.com/maximekl/django2-url-robots" }, "release_url": "https://pypi.org/project/django2-url-robots/3.1.0/", "requires_dist": null, "requires_python": "", "summary": "Django robots.txt generator", "version": "3.1.0" }, "last_serial": 5572987, "releases": { "3.0": [ { "comment_text": "", "digests": { "md5": "1cde25b0280700722b2c101a6a5f73e2", "sha256": "6f3edb431deda38ec840199a3c2d1c87f028036d21a27196f6373e91cde64070" }, "downloads": -1, "filename": "django2-url-robots-3.0.tar.gz", "has_sig": false, "md5_digest": "1cde25b0280700722b2c101a6a5f73e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4519, "upload_time": "2018-05-15T09:31:15", "url": "https://files.pythonhosted.org/packages/2e/8f/f6b4ed7405aafb949511b1626d3234452af2d51458f3dc60fbd8cf2988ae/django2-url-robots-3.0.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "a96661c37ae0ab19686e4c61e708cb0c", "sha256": "7f8735e8324c89366c864a6c1d24d4bf25999cea41cebc0315a9ae639ca02067" }, "downloads": -1, "filename": "django2_url_robots-3.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a96661c37ae0ab19686e4c61e708cb0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6680, "upload_time": "2019-07-23T15:16:02", "url": "https://files.pythonhosted.org/packages/8b/eb/363ce333810897a41a26a680140098881df047ff0f4907281678a9352716/django2_url_robots-3.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac18edc2d97e7d55974c81046765a813", "sha256": "12e54876f0fa08adfdc080f5aa15281b3a4b8628ee29459e36a778bf220335de" }, "downloads": -1, "filename": "django2-url-robots-3.1.0.tar.gz", "has_sig": false, "md5_digest": "ac18edc2d97e7d55974c81046765a813", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4812, "upload_time": "2019-07-23T15:16:04", "url": "https://files.pythonhosted.org/packages/61/dc/b977d70b3c51baf23b0372a678e766ef84bfaeb606115d25eb9d6de8b0c0/django2-url-robots-3.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a96661c37ae0ab19686e4c61e708cb0c", "sha256": "7f8735e8324c89366c864a6c1d24d4bf25999cea41cebc0315a9ae639ca02067" }, "downloads": -1, "filename": "django2_url_robots-3.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a96661c37ae0ab19686e4c61e708cb0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6680, "upload_time": "2019-07-23T15:16:02", "url": "https://files.pythonhosted.org/packages/8b/eb/363ce333810897a41a26a680140098881df047ff0f4907281678a9352716/django2_url_robots-3.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac18edc2d97e7d55974c81046765a813", "sha256": "12e54876f0fa08adfdc080f5aa15281b3a4b8628ee29459e36a778bf220335de" }, "downloads": -1, "filename": "django2-url-robots-3.1.0.tar.gz", "has_sig": false, "md5_digest": "ac18edc2d97e7d55974c81046765a813", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4812, "upload_time": "2019-07-23T15:16:04", "url": "https://files.pythonhosted.org/packages/61/dc/b977d70b3c51baf23b0372a678e766ef84bfaeb606115d25eb9d6de8b0c0/django2-url-robots-3.1.0.tar.gz" } ] }