Metadata-Version: 2.1
Name: django-dynamic-breadcrumbs
Version: 0.2
Summary: A Django app to generate HTML breadcrumbs dynamically from URL path
Home-page: https://github.com/marcanuy/django-dynamic-breadcrumbs
Author: Marcelo Canina
Author-email: me@marcanuy.com
License: MIT
Project-URL: Source, https://github.com/marcanuy/django-dynamic-breadcrumbs
Project-URL: Bug Reports, https://github.com/marcanuy/django-dynamic-breadcrumbs/issues
Description: 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)
        [![PyPI version](https://badge.fury.io/py/django-dynamic-breadcrumbs.svg)](https://badge.fury.io/py/django-dynamic-breadcrumbs)
        [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
        [![Downloads](https://pepy.tech/badge/django-dynamic-breadcrumbs)](https://pepy.tech/project/django-dynamic-breadcrumbs)
        
        django-dynamic-breadcrumbs is a Django app to generate HTML breadcrumbs
        dynamically from URL paths. 
        
        At `https://themusicsecret.com/reference/instrument/`, it shows:
        `Home > Reference > Instrument`.
        
        # Quick start
        
        ## 1. Add to settings
        
        Add "dynamic_breadcrumbs" to your INSTALLED_APPS setting like this::
        
            INSTALLED_APPS = [
                ...
                'dynamic_breadcrumbs',
            ]
        
        ## 2. Add context processor
        
        Add `"dynamic_breadcrumbs.context_processors.breadcrumbs"` the **dynamic-breadcrumbs** context processor to your settings like this::
        
        ~~~ 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 `breadcrumbs.html` template code.
        
        ~~~
        	{% block breadcrumbs %}
        	{% if breadcrumbs %}
        	<div class="container">
        	    {% include "dynamic_breadcrumbs/breadcrumbs.html" with breadcrumbs=breadcrumbs%}
        	</div>
        	{% endif %}
        	{% endblock %}
        ~~~
        
        Now each time you visit a page which makes use of the above template,
        it will have the breadcrumbs generated from the URL path.
        
        
        ## References
        
        - https://www.w3.org/TR/html53/common-idioms-without-dedicated-elements.html#bread-crumb-navigation
        
Keywords: django, breadcrumbs
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: >=3.6
Description-Content-Type: text/markdown
