Skip to content

Commit ccd0992

Browse files
Synced README changes to docs (#506)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c5acb7a commit ccd0992

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

docs/README.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,18 @@
22

33
[![Test](https://github.com/tj-django/django-view-breadcrumbs/actions/workflows/test.yml/badge.svg)](https://github.com/tj-django/django-view-breadcrumbs/actions/workflows/test.yml) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/537b0ce56e744f078f17cc8ccd4200d8)](https://www.codacy.com/gh/tj-django/django-view-breadcrumbs/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-django/django-view-breadcrumbs\&utm_campaign=Badge_Grade) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/tj-django/django-view-breadcrumbs/main.svg)](https://results.pre-commit.ci/latest/github/tj-django/django-view-breadcrumbs/main) [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/537b0ce56e744f078f17cc8ccd4200d8)](https://www.codacy.com/gh/tj-django/django-view-breadcrumbs/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-django/django-view-breadcrumbs\&utm_campaign=Badge_Coverage) [![PyPI version](https://badge.fury.io/py/django-view-breadcrumbs.svg)](https://badge.fury.io/py/django-view-breadcrumbs) [![Updates](https://pyup.io/repos/github/tj-django/django-view-breadcrumbs/shield.svg)](https://pyup.io/repos/github/tj-django/django-view-breadcrumbs/)
44

5-
![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-view-breadcrumbs) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-view-breadcrumbs) [![Downloads](https://pepy.tech/badge/django-view-breadcrumbs)](https://pepy.tech/project/django-view-breadcrumbs) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
6-
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
7-
8-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
9-
10-
Provides a set of breadcrumb mixin classes that can be added to any django view.
11-
12-
Requires adding `{% render_breadcrumbs %}` to just the base template.
13-
14-
<img width="1438" alt="breadcrumbs" src="https://user-images.githubusercontent.com/17484350/128493747-776706bf-d46c-4b57-ba54-c64fcc71ada7.png">
15-
16-
In the `base.html` template simply add the `render_breadcrumbs` tag and any template
17-
that inherits the base should have breadcrumbs included.
18-
19-
**Example:**
20-
21-
my_app
22-
|--templates
23-
|--base.html
24-
|--create.html
5+
![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-view-breadcrumbs) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-view-breadcrumbs) [![Downloads](https://pepy.tech/badge/django-view-breadcrumbs)](https://pepy.tech/project/django-view-breadcrumbs)
256

26-
`base.html`
27-
28-
```jinja2
29-
{% load view_breadcrumbs %}
7+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
308

31-
{% block breadcrumbs %}
32-
{% render_breadcrumbs %} {# Optionally provide a custom template e.g {% render_breadcrumbs "view_breadcrumbs/bootstrap5.html" %} #}
33-
{% endblock %}
34-
```
35-
36-
And your `create.html`.
9+
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
3710

38-
```jinja2
39-
{% extends "base.html" %}
40-
```
11+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
4112

4213
## Table of Contents
4314

15+
* [Background](#background)
16+
4417
* [Installation](#installation)
4518

4619
* [Add `view_breadcrumbs` to your INSTALLED\_APPS](#add-view_breadcrumbs-to-your-installed_apps)
@@ -87,6 +60,37 @@ And your `create.html`.
8760

8861
* [Contributors ✨](#contributors-)
8962

63+
## Background
64+
65+
This package provides a set of breadcrumb mixin classes that can be added to any django class based view and requires adding just `{% render_breadcrumbs %}` to the base template.
66+
67+
<img width="1438" alt="breadcrumbs" src="https://user-images.githubusercontent.com/17484350/128493747-776706bf-d46c-4b57-ba54-c64fcc71ada7.png">
68+
69+
In the `base.html` template add the `render_breadcrumbs` tag and any template that inherits the base should have breadcrumbs included.
70+
71+
**Example:**
72+
73+
my_app
74+
|--templates
75+
|--base.html
76+
|--create.html
77+
78+
`base.html`
79+
80+
```jinja2
81+
{% load view_breadcrumbs %}
82+
83+
{% block breadcrumbs %}
84+
{% render_breadcrumbs %} {# Optionally provide a custom template e.g {% render_breadcrumbs "view_breadcrumbs/bootstrap5.html" %} #}
85+
{% endblock %}
86+
```
87+
88+
And your `create.html`.
89+
90+
```jinja2
91+
{% extends "base.html" %}
92+
```
93+
9094
## Installation
9195

9296
```bash

0 commit comments

Comments
 (0)