diff --git a/README.md b/README.md index bfc3c10..d7804c3 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ Unsure whether you want to use a snippet link or embed? Embeds have complete fle 1. `pip install wagtail-draftail-snippet` 1. Add `wagtail_draftail_snippet` to `INSTALLED_APPS` in Django settings 1. Add `"snippet-link"` and `"snippet-embed"` to the `features` keyword list argument when instantiating a `RichTextBlock`, e.g. `paragraph = RichTextBlock(features=["bold", "italic", "h1", "h2", "h3", "snippet-link", "snippet-embed"])` -1. Create a frontend template to determine how the snippet model will be rendered. Frontend templates are required for a snippet to be selected and are discovered when they match a path like `{app_name}/{model_name}_snippet_link.html` and `{app_name}/{model_name}_snippet_embed.html`. For example, if you have an `Affiliate` snippet model in `affiliates/models.py`, then a file in `affiliates/templates/affiliates/affiliate_snippet_link.html` and `affiliates/templates/affiliates/affiliate_snippet_embed.html` would be required. - +1. Create a frontend template to determine how the snippet model will be rendered. Frontend templates are required for a snippet to be selected and are discovered when they match a path like `{app_name}/{model_name}_snippet_link.html` and `{app_name}/{model_name}_snippet_embed.html`. For example, if you have an `Affiliate` snippet model in `affiliates/models.py`, then a file in `affiliates/templates/affiliates/affiliate_snippet_link.html` and `affiliates/templates/affiliates/affiliate_snippet_embed.html` would be required. ## Example use-case @@ -26,6 +25,7 @@ Wagtail is used for a content site that will display articles that have affiliat When the content gets rendered, it uses the specific affiliate model to get the URL stored in the snippet model. If the affiliate's URL ever changes, the snippet can be changed in the Wagtail admin, and the all of the content will use the correct link when rendered. An example frontend template in `affiliates/templates/affiliates/affiliate_snippet_link.html` could be the following. + ``` ``` @@ -39,6 +39,7 @@ The package requires Wagtail 2.5 or above. 1. `poetry build` ## Run tests + 1. `poetry install` 1. `poetry run pytest` @@ -46,7 +47,7 @@ The package requires Wagtail 2.5 or above. - [Parbhat Puri](https://github.com/Parbhat) - [Adam Hill](https://github.com/adamghill/) - +- [Brady Moe](https://github.com/bmoe872/) ## License diff --git a/pyproject.toml b/pyproject.toml index 81da18b..5f8b195 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "wagtail-draftail-snippet" version = "0.4.0" description = "Associate RichTextBlock text content to a snippet model." -authors = ["Parbhat Puri ", "Adam Hill "] +authors = ["Parbhat Puri ", "Adam Hill ", "Brady Moe "] repository = "https://github.com/themotleyfool/wagtail-draftail-snippet" readme = "README.md" license = "BSD-3-Clause"