{ "info": { "author": "Slawek Ehlert", "author_email": "slafs@op.pl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Topic :: Utilities" ], "description": "========================\ndjango-url-breadcrumbs\n========================\n\n.. image:: https://drone.io/bitbucket.org/slafs/django-url-breadcrumbs/status.png\n :target: https://drone.io/bitbucket.org/slafs/django-url-breadcrumbs/latest\n\n\nAn app for generic breadcrumbs in Django (>= 1.4).\n\nThe idea is to make breadcrumbs out of parts of an url path. This application assumes that your url patterns are well structured. For example like this::\n\n / # root path\n /application/ # root of an app/module\n /application/object_type/ # list of specific objects\n /application/object_type/some_object/ # details of specific object\n /application/object_type/some_object/edit/ # edit (or any other operations) of a specific object\n\n\nInstallation\n===============\n\n1. Install the package from PyPi. For example via pip::\n\n pip install django-url-breadcrumbs\n\n2. Add ``urlbreadcrumbs`` to INSTALLED_APPS::\n\n INSTALLED_APPS = ( \n ...\n 'urlbreadcrumbs',\n ...\n )\n\n3. Make sure you have a request context processor ``django.core.context_processors.request`` in your ``TEMPLATE_CONTEXT_PROCESSORS``.\n\n\nUsage\n==========\n\nLet's assume you have your urls in a form:\n\nin ``ROOT_URLCONF``::\n\n from django.conf.urls import patterns, include, url\n from myproject.views import some_view\n\n urlpatterns = patterns('',\n url(r'^$', some_view, {'template' : 'index.html'}, name='index'),\n url(r'^test1/', include('test1.urls')),\n )\n\n\n``urls.py`` in application called ``test1``::\n\n from django.conf.urls import patterns, include, url\n from test1.views import some_view\n\n urlpatterns = patterns('',\n url(r'^example/$', some_view, {'template' : 't1.html'}, name='t1home'),\n )\n\n\nIn order to define your breadcrumbs you can make a mapping in ``settings.py`` like this::\n\n URLBREADCRUMBS_NAME_MAPPING = {\n 'index' : 'Home page',\n 't1home' : 'Index page of Test1',\n }\n\n\nThen somwhere in your base template (lets call it ``base.html``) you can write this::\n\n {% load urlbreadcrumbs_tags %}\n {% render_breadcrumbs %}\n\nor you can specify your own template::\n\n {% render_breadcrumbs \"test1/mybreadcrumbs_template.html\" %}\n\nAlso you can just include your breadcrumbs template::\n\n {% include \"test1/mybreadcrumbs_template.html\" %}\n\nBut to use it like this make sure you've added a context procesor ``urlbreadcrumbs.context_processors.build_breadcrumbs``\nin your ``TEMPLATE_CONTEXT_PROCESSORS`` setting.\n\nIn your template you have one additional context variable called ``breadcrumbs`` \nwhich is a list of two-tuples containing name and url of a breadcrumb.\nThe default template used by ``django-url-breadcrumbs`` (``urlbreadcrumbs/default.html``) looks like this::\n\n {% for n,u in breadcrumbs %}\n {% if not forloop.last %}\n {{ n }} »\n {% else %}\n {{ n }}\n {% endif %}\n {% endfor %}\n\nSo now, assuming template ``t1.html`` is extending ``base.html``, when viewing ``/test1/example/``\nyou should see something like this ``Home page \u00bb Index page of Test1``.\n\nAnother way of specyfing a name for a breadcrumb is to use a custom ``url`` function in your ``urls.py``.\nInstead of defining a mapping in ``URLBREADCRUMBS_NAME_MAPPING`` setting you can do this in ``urls.py`` of your ``ROOT_URLCONF`` and ``test1`` application::\n\n from django.conf.urls import patterns, include, url\n from urlbreadcrumbs import url as burl\n\n urlpatterns = patterns('',\n ...\n burl(r'^test1/', include(test1_urls)),\n ...\n )\n\nand ::\n\n from django.conf.urls import patterns, include, url\n from test1.views import some_view\n from urlbreadcrumbs import url as burl\n\n urlpatterns = patterns('',\n burl(r'^example/$', some_view, {'template' : 't1.html'}, name='t1home', verbose_name='Index page of Test1'),\n )\n\nThis should work as in previous example.\n\nDevelopment\n===============\n\nIdeas and/or bug reports are welcome. Consider reporting an issue on https://bitbucket.org/slafs/django-url-breadcrumbs/issues?status=new&status=open\n\nPull requests are also welcome ;).\n\nTo start working on this app get the source from Bitbucket::\n\n hg clone https://bitbucket.org/slafs/django-url-breadcrumbs\n\nand in a newly created virtualenv do this::\n\n pip install -r dev_requirements.txt\n python setup.py test\n\nTesting\n-----------\n\ndjango-url-breadcrumbs uses `pytest`_ for running it's test suite and `tox`_ for checking it's compatibilty\nwith different Python and Django versions.\n\nIn order to perform tests with your current python and django installation do this::\n\n python setup.py test\n\nTo test it with different python and django versions run this::\n\n tox\n\n.. _tox: http://tox.readthedocs.org\n.. _pytest: http://pytest.org", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/slafs/django-url-breadcrumbs/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-url-breadcrumbs", "package_url": "https://pypi.org/project/django-url-breadcrumbs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-url-breadcrumbs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/slafs/django-url-breadcrumbs/" }, "release_url": "https://pypi.org/project/django-url-breadcrumbs/0.3.3/", "requires_dist": null, "requires_python": null, "summary": "a generic app to provide a simple breadcrumbs functionality in django projects", "version": "0.3.3" }, "last_serial": 1054636, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "7103eab0bbf448d726c3791c94cb44d8", "sha256": "c2686249c16ea41021b7fe8ecfbb36095c91d2fa10668b776e4b967657579bbe" }, "downloads": -1, "filename": "django_url_breadcrumbs-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7103eab0bbf448d726c3791c94cb44d8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11573, "upload_time": "2014-01-28T21:52:19", "url": "https://files.pythonhosted.org/packages/e0/2f/14af44e8467704d90a9b01f308df7fc85bbae8c91e8a518815ec06088e0e/django_url_breadcrumbs-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cc0e711cb28d53bb840f8a8d0074e1a", "sha256": "54229ade75b8b19ffd668f8ef2d3e4c0ba1f844d2ebbb9e04533bcf254a4d0c8" }, "downloads": -1, "filename": "django-url-breadcrumbs-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9cc0e711cb28d53bb840f8a8d0074e1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7389, "upload_time": "2014-01-28T21:52:11", "url": "https://files.pythonhosted.org/packages/43/7c/31f14961f2ac4c630edc03af459baafc5f00172a3ca53a6e69a1a464b936/django-url-breadcrumbs-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "cd3c34f450e0087027e9cda7d2e56dfe", "sha256": "1d82b07b0f822ec84ff9a4e4df965cf4908797dc6ea956fd0453719901b54623" }, "downloads": -1, "filename": "django_url_breadcrumbs-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cd3c34f450e0087027e9cda7d2e56dfe", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11725, "upload_time": "2014-01-29T13:53:56", "url": "https://files.pythonhosted.org/packages/85/66/d564e68759f4fca5cb000adbad59288330237d035145ad6a9bed0ab66ae1/django_url_breadcrumbs-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b49c15d8ccf32b76733253facedc59b", "sha256": "72c155a565867742c14b3d97c2f82b25da1899e06952f063872a1420acf15155" }, "downloads": -1, "filename": "django-url-breadcrumbs-0.3.1.tar.gz", "has_sig": false, "md5_digest": "3b49c15d8ccf32b76733253facedc59b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7491, "upload_time": "2014-01-29T13:53:52", "url": "https://files.pythonhosted.org/packages/9c/10/3f234aeb24efe318999aff2b6c0f734c8ac23e2a22ae9edd4d4831f126b0/django-url-breadcrumbs-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "4a5940e69e588c102cd4e1d162fe265e", "sha256": "bea44ef300e59cb2ee6cc8b6c2c3f1408583c61fd41edd829fd1663477c2845c" }, "downloads": -1, "filename": "django_url_breadcrumbs-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4a5940e69e588c102cd4e1d162fe265e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11671, "upload_time": "2014-02-15T16:42:03", "url": "https://files.pythonhosted.org/packages/79/7c/2dbff4a033ffc61f37821b33e88035174871b9807b0cd1f77f6779a9cef4/django_url_breadcrumbs-0.3.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "53a60326eaeded56e89c498b263f6a74", "sha256": "031bde6f6adeab6be3796718630bff115ec8a0ca6f35d0fbb9bf7849b0e436cd" }, "downloads": -1, "filename": "django-url-breadcrumbs-0.3.2.tar.gz", "has_sig": false, "md5_digest": "53a60326eaeded56e89c498b263f6a74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7585, "upload_time": "2014-02-15T16:41:58", "url": "https://files.pythonhosted.org/packages/f7/1e/3d868c12ab5060cf4b4c0ef2353291c8313a603e1a71a6f707753a2cd427/django-url-breadcrumbs-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "743494cb4f46448e1cf416ecd2bb26d1", "sha256": "920a89d6b4f47878473aa834f6e0ae5e8b9d18b1a4cdc8d545bfd0157a5d4889" }, "downloads": -1, "filename": "django_url_breadcrumbs-0.3.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "743494cb4f46448e1cf416ecd2bb26d1", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12370, "upload_time": "2014-04-08T08:59:57", "url": "https://files.pythonhosted.org/packages/1e/02/529661d988af3a979a3c4f9d831a08f0ab199cd94314373be228537292eb/django_url_breadcrumbs-0.3.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "299bdcb4ab87854615a7438d20583c3b", "sha256": "b66bc852a0a463a93dc983626b4ea9182bd00d47b40ed08ee9cfbc90c8cd73d0" }, "downloads": -1, "filename": "django-url-breadcrumbs-0.3.3.tar.gz", "has_sig": false, "md5_digest": "299bdcb4ab87854615a7438d20583c3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7877, "upload_time": "2014-04-08T08:59:55", "url": "https://files.pythonhosted.org/packages/e5/36/6a69a4db893eb91f5882d8a4b1027d7305a885ecacde1ec28017f73f5aae/django-url-breadcrumbs-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "743494cb4f46448e1cf416ecd2bb26d1", "sha256": "920a89d6b4f47878473aa834f6e0ae5e8b9d18b1a4cdc8d545bfd0157a5d4889" }, "downloads": -1, "filename": "django_url_breadcrumbs-0.3.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "743494cb4f46448e1cf416ecd2bb26d1", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12370, "upload_time": "2014-04-08T08:59:57", "url": "https://files.pythonhosted.org/packages/1e/02/529661d988af3a979a3c4f9d831a08f0ab199cd94314373be228537292eb/django_url_breadcrumbs-0.3.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "299bdcb4ab87854615a7438d20583c3b", "sha256": "b66bc852a0a463a93dc983626b4ea9182bd00d47b40ed08ee9cfbc90c8cd73d0" }, "downloads": -1, "filename": "django-url-breadcrumbs-0.3.3.tar.gz", "has_sig": false, "md5_digest": "299bdcb4ab87854615a7438d20583c3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7877, "upload_time": "2014-04-08T08:59:55", "url": "https://files.pythonhosted.org/packages/e5/36/6a69a4db893eb91f5882d8a4b1027d7305a885ecacde1ec28017f73f5aae/django-url-breadcrumbs-0.3.3.tar.gz" } ] }