django-dynamic-breadcrumbs


Namedjango-dynamic-breadcrumbs JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttps://github.com/marcanuy/django-dynamic-breadcrumbs
SummaryA Django app to generate HTML breadcrumbs dynamically from URL path
upload_time2023-09-19 20:02:54
maintainer
docs_urlNone
authorMarcelo Canina
requires_python>=3.6
licenseMIT
keywords django breadcrumbs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            django-dynamic-breadcrumbs
=====

[![Django CI](https://github.com/marcanuy/django-dynamic-breadcrumbs/actions/workflows/django.yml/badge.svg)](https://github.com/marcanuy/django-dynamic-breadcrumbs/actions/workflows/django.yml)
[![Coverage Status](https://coveralls.io/repos/github/marcanuy/django-dynamic-breadcrumbs/badge.svg?branch=main)](https://coveralls.io/github/marcanuy/django-dynamic-breadcrumbs?branch=main)
[![PyPI version](https://img.shields.io/pypi/v/django-dynamic-breadcrumbs)](https://pypi.org/project/django-dynamic-breadcrumbs/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Downloads](https://static.pepy.tech/badge/django-dynamic-breadcrumbs)](https://pepy.tech/project/django-dynamic-breadcrumbs)
[![Documentation Status](https://readthedocs.org/projects/django-dynamic-breadcrumbs/badge/?version=latest)](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[![Django CI](https://github.com/marcanuy/django-dynamic-breadcrumbs/actions/workflows/django.yml/badge.svg)](https://github.com/marcanuy/django-dynamic-breadcrumbs/actions/workflows/django.yml)\n[![Coverage Status](https://coveralls.io/repos/github/marcanuy/django-dynamic-breadcrumbs/badge.svg?branch=main)](https://coveralls.io/github/marcanuy/django-dynamic-breadcrumbs?branch=main)\n[![PyPI version](https://img.shields.io/pypi/v/django-dynamic-breadcrumbs)](https://pypi.org/project/django-dynamic-breadcrumbs/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Downloads](https://static.pepy.tech/badge/django-dynamic-breadcrumbs)](https://pepy.tech/project/django-dynamic-breadcrumbs)\n[![Documentation Status](https://readthedocs.org/projects/django-dynamic-breadcrumbs/badge/?version=latest)](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"
}
        
Elapsed time: 0.25919s