django-dynamic-breadcrumbs
=====
[](https://github.com/marcanuy/django-dynamic-breadcrumbs/actions/workflows/django.yml)
[](https://coveralls.io/github/marcanuy/django-dynamic-breadcrumbs?branch=main)
[](https://pypi.org/project/django-dynamic-breadcrumbs/)
[](https://github.com/psf/black)
[](https://pepy.tech/project/django-dynamic-breadcrumbs)
[](https://django-dynamic-breadcrumbs.readthedocs.io/en/latest/?badge=latest)
`django-dynamic-breadcrumbs` is a Django app to generate HTML breadcrumbs
dynamically from URL paths.
At `https://example.com/reference/instrument/guitar/`, shows:
`Home > Reference > Instrument > Guitar`.
# Quick start
## 1. Install
~~~
pip install django-dynamic-breadcrumbs
~~~
## 2. Add to settings
Add "dynamic_breadcrumbs" label to your INSTALLED_APPS settings:
INSTALLED_APPS = [
...
'dynamic_breadcrumbs',
]
Add `dynamic_breadcrumbs.context_processors.breadcrumbs` to **context_processors**:
~~~ python
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
#...
"dynamic_breadcrumbs.context_processors.breadcrumbs",
],
},
},
]
~~~
## 3. Add template
Include the `dynamic_breadcrumbs/breadcrumbs.html` in your base template.
~~~
{% if breadcrumbs %}
<div class="container">
{% include "dynamic_breadcrumbs/breadcrumbs.html" with breadcrumbs=breadcrumbs%}
</div>
{% endif %}
~~~
Now each time you visit a page which makes use of the above template,
it will have the breadcrumbs generated from the URL path.
## 4. (Optional) Customization
Tweak default [settings](https://django-dynamic-breadcrumbs.readthedocs.io/en/latest/ref/settings.html).
# Documentation
Full docs at: https://django-dynamic-breadcrumbs.readthedocs.io/
# License
MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/marcanuy/django-dynamic-breadcrumbs",
"name": "django-dynamic-breadcrumbs",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "django, breadcrumbs",
"author": "Marcelo Canina",
"author_email": "me@marcanuy.com",
"download_url": "https://files.pythonhosted.org/packages/63/7e/417a8f176f1fbf03a9a10320d976e8352de54153c0efed3bc06339babcef/django-dynamic-breadcrumbs-0.4.3.tar.gz",
"platform": null,
"description": "django-dynamic-breadcrumbs\n=====\n\n[](https://github.com/marcanuy/django-dynamic-breadcrumbs/actions/workflows/django.yml)\n[](https://coveralls.io/github/marcanuy/django-dynamic-breadcrumbs?branch=main)\n[](https://pypi.org/project/django-dynamic-breadcrumbs/)\n[](https://github.com/psf/black)\n[](https://pepy.tech/project/django-dynamic-breadcrumbs)\n[](https://django-dynamic-breadcrumbs.readthedocs.io/en/latest/?badge=latest)\n\n`django-dynamic-breadcrumbs` is a Django app to generate HTML breadcrumbs\ndynamically from URL paths.\n\nAt `https://example.com/reference/instrument/guitar/`, shows:\n`Home > Reference > Instrument > Guitar`.\n\n# Quick start\n\n## 1. Install\n\n~~~\npip install django-dynamic-breadcrumbs\n~~~\n\n## 2. Add to settings\n\nAdd \"dynamic_breadcrumbs\" label to your INSTALLED_APPS settings:\n\n INSTALLED_APPS = [\n ...\n 'dynamic_breadcrumbs',\n ]\n\nAdd `dynamic_breadcrumbs.context_processors.breadcrumbs` to **context_processors**:\n\n~~~ python\nTEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [os.path.join(BASE_DIR, \"templates\")],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n\t\t\t\t#...\n \"dynamic_breadcrumbs.context_processors.breadcrumbs\",\n ],\n },\n },\n]\n~~~\n\n## 3. Add template\n\nInclude the `dynamic_breadcrumbs/breadcrumbs.html` in your base template.\n\n~~~\n{% if breadcrumbs %}\n<div class=\"container\">\n {% include \"dynamic_breadcrumbs/breadcrumbs.html\" with breadcrumbs=breadcrumbs%}\n</div>\n{% endif %}\n~~~\n\nNow each time you visit a page which makes use of the above template,\nit will have the breadcrumbs generated from the URL path.\n\n## 4. (Optional) Customization\n\nTweak default [settings](https://django-dynamic-breadcrumbs.readthedocs.io/en/latest/ref/settings.html).\n\n# Documentation\n\nFull docs at: https://django-dynamic-breadcrumbs.readthedocs.io/\n\n# License\n\nMIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Django app to generate HTML breadcrumbs dynamically from URL path",
"version": "0.4.3",
"project_urls": {
"Bug Reports": "https://github.com/marcanuy/django-dynamic-breadcrumbs/issues",
"Documentation": "https://django-dynamic-breadcrumbs.readthedocs.io/",
"Homepage": "https://github.com/marcanuy/django-dynamic-breadcrumbs",
"Source": "https://github.com/marcanuy/django-dynamic-breadcrumbs"
},
"split_keywords": [
"django",
" breadcrumbs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "637e417a8f176f1fbf03a9a10320d976e8352de54153c0efed3bc06339babcef",
"md5": "66202ce52bbca137f92a64ec7b0fa719",
"sha256": "a6e89a67eabd47aa32fea3f55a3f5fb89bfccc90a35d0119e2b30656914eaa4b"
},
"downloads": -1,
"filename": "django-dynamic-breadcrumbs-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "66202ce52bbca137f92a64ec7b0fa719",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10210,
"upload_time": "2023-09-19T20:02:54",
"upload_time_iso_8601": "2023-09-19T20:02:54.308503Z",
"url": "https://files.pythonhosted.org/packages/63/7e/417a8f176f1fbf03a9a10320d976e8352de54153c0efed3bc06339babcef/django-dynamic-breadcrumbs-0.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-19 20:02:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "marcanuy",
"github_project": "django-dynamic-breadcrumbs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-dynamic-breadcrumbs"
}