Name | wagtail-footnotes JSON |
Version |
0.10.0
JSON |
| download |
home_page | |
Summary | Add footnotes to rich text in your Wagtail pages |
upload_time | 2023-07-28 16:28:40 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | |
keywords |
wagtail
django
footnotes
rich text
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Wagtail Footnotes
[![PyPI](https://img.shields.io/pypi/v/wagtail-footnotes.svg)](https://pypi.org/project/wagtail-footnotes/)
[![PyPI downloads](https://img.shields.io/pypi/dm/wagtail-footnotes.svg)](https://pypi.org/project/wagtail-footnotes/)
[![Build Status](https://github.com/torchbox/wagtail-footnotes/workflows/CI/badge.svg)](https://github.com/torchbox/wagtail-footnotes/actions)
Add footnotes functionality to your Wagtail project.
## Usage
- Add the app to `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
# ...
"wagtail_footnotes",
# ...
]
```
- Add the footnotes `urls.py` to your project's `urls.py`:
```python
from wagtail_footnotes import urls as footnotes_urls
urlpatterns = [
# ...
path("footnotes/", include(footnotes_urls)),
# ...
]
```
Note: The URL has to be defined as above as it is currently hardcoded in the Javascript.
- Update your page models to show the footnotes field:
```python
class InformationPage(BasePage):
# ...
content_panels = [
# ...
InlinePanel("footnotes", label="Footnotes"),
]
```
- Update your `RichTextBlock`s
- Add `"footnotes"` to the `features` arg for each `RichTextBlock` that you want to have this functionality
- You will also need to change any `RichTextBlock`s to `wagtail_footnotes.blocks.RichTextBlockWithFootnotes`
- Update your page templates to include `{% include "wagtail_footnotes/includes/footnotes.html" %}`
Make and run migrations:
```bash
./manage.py makemigrations
./manage.py migrate
```
## Settings
- `WAGTAIL_FOOTNOTES_TEXT_FEATURES`
- Default: `["bold", "italic", "link"]`
- Use this to update a list of Rich Text features allowed in the footnote text.
## Common issues
- I click on the `Fn` button in the editor and it stops working
- This is likely because the URL in the JS does not match the URL of the footnotes view. Check the URL in `wagtail_footnotes/static/footnotes/js/footnotes.js` matches the URL you set.
- `NoneType` error when rendering page.
- Make sure you are rendering the field in the template using `{% include_block page.field_name %}`
Raw data
{
"_id": null,
"home_page": "",
"name": "wagtail-footnotes",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Kevin Howbrook <kevin.howbrook@torchbox.com>, Dan Braghis <dan.braghis@torchbox.com>",
"keywords": "Wagtail,Django,footnotes,rich text",
"author": "",
"author_email": "Cameron Lamb <hello@torchbox.com>",
"download_url": "https://files.pythonhosted.org/packages/dd/a1/667985f428c69c36f1c07fbf731ef50ea35ed3cfae6f493c5145a3c7c0f2/wagtail_footnotes-0.10.0.tar.gz",
"platform": null,
"description": "# Wagtail Footnotes\n\n[![PyPI](https://img.shields.io/pypi/v/wagtail-footnotes.svg)](https://pypi.org/project/wagtail-footnotes/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/wagtail-footnotes.svg)](https://pypi.org/project/wagtail-footnotes/)\n[![Build Status](https://github.com/torchbox/wagtail-footnotes/workflows/CI/badge.svg)](https://github.com/torchbox/wagtail-footnotes/actions)\n\nAdd footnotes functionality to your Wagtail project.\n\n## Usage\n\n- Add the app to `INSTALLED_APPS`:\n\n```python\nINSTALLED_APPS = [\n # ...\n \"wagtail_footnotes\",\n # ...\n]\n```\n\n- Add the footnotes `urls.py` to your project's `urls.py`:\n\n```python\nfrom wagtail_footnotes import urls as footnotes_urls\n\nurlpatterns = [\n # ...\n path(\"footnotes/\", include(footnotes_urls)),\n # ...\n]\n```\n\nNote: The URL has to be defined as above as it is currently hardcoded in the Javascript.\n\n- Update your page models to show the footnotes field:\n\n```python\nclass InformationPage(BasePage):\n # ...\n content_panels = [\n # ...\n InlinePanel(\"footnotes\", label=\"Footnotes\"),\n ]\n```\n\n- Update your `RichTextBlock`s\n - Add `\"footnotes\"` to the `features` arg for each `RichTextBlock` that you want to have this functionality\n - You will also need to change any `RichTextBlock`s to `wagtail_footnotes.blocks.RichTextBlockWithFootnotes`\n- Update your page templates to include `{% include \"wagtail_footnotes/includes/footnotes.html\" %}`\n\nMake and run migrations:\n\n```bash\n./manage.py makemigrations\n./manage.py migrate\n```\n\n## Settings\n\n- `WAGTAIL_FOOTNOTES_TEXT_FEATURES`\n - Default: `[\"bold\", \"italic\", \"link\"]`\n - Use this to update a list of Rich Text features allowed in the footnote text.\n\n## Common issues\n\n- I click on the `Fn` button in the editor and it stops working\n - This is likely because the URL in the JS does not match the URL of the footnotes view. Check the URL in `wagtail_footnotes/static/footnotes/js/footnotes.js` matches the URL you set.\n- `NoneType` error when rendering page.\n - Make sure you are rendering the field in the template using `{% include_block page.field_name %}`\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Add footnotes to rich text in your Wagtail pages",
"version": "0.10.0",
"project_urls": {
"Changelog": "https://github.com/torchbox/wagtail-footnotes/blob/main/CHANGELOG.md",
"Repository": "https://github.com/torchbox/wagtail-footnotes"
},
"split_keywords": [
"wagtail",
"django",
"footnotes",
"rich text"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dfead723688d64e087a5a77c408506ba776fccb314891c9b916781d6f185d511",
"md5": "72ff0167eb6749189176b035346311de",
"sha256": "fefdf0c5c25e7bea261c2f96c8f0bdc4a9209810b299074e97f4a6a20e452d62"
},
"downloads": -1,
"filename": "wagtail_footnotes-0.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72ff0167eb6749189176b035346311de",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 12447,
"upload_time": "2023-07-28T16:28:39",
"upload_time_iso_8601": "2023-07-28T16:28:39.834299Z",
"url": "https://files.pythonhosted.org/packages/df/ea/d723688d64e087a5a77c408506ba776fccb314891c9b916781d6f185d511/wagtail_footnotes-0.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dda1667985f428c69c36f1c07fbf731ef50ea35ed3cfae6f493c5145a3c7c0f2",
"md5": "4a73a402b28f06910dd856c0b50ec081",
"sha256": "c3a05b90e015b5a9e3796a0a35faecc0a43a70de77493ae1ca936c822fbcada5"
},
"downloads": -1,
"filename": "wagtail_footnotes-0.10.0.tar.gz",
"has_sig": false,
"md5_digest": "4a73a402b28f06910dd856c0b50ec081",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10430,
"upload_time": "2023-07-28T16:28:40",
"upload_time_iso_8601": "2023-07-28T16:28:40.848095Z",
"url": "https://files.pythonhosted.org/packages/dd/a1/667985f428c69c36f1c07fbf731ef50ea35ed3cfae6f493c5145a3c7c0f2/wagtail_footnotes-0.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-28 16:28:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "torchbox",
"github_project": "wagtail-footnotes",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "wagtail-footnotes"
}