Skip to content

Commit

Permalink
Publish; update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel2392 committed Apr 15, 2024
1 parent 1c4a377 commit 0a45607
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,16 @@ Getting Started
return render_to_string("myapp/render_my_field.html", self.get_context(request))
```

Your content will then automatically be rendered with that method when need be by using `{% fedit field self.content %} `
Your content will then automatically be rendered with that method when need be by using
`{% fedit field self.content %} `
4. **But wait?! I go to my template and I do not see a way to edit!**That is true! We try to protect any styling on your actual page; we do not want to interfere.Instead; we serve the editing interface on a different URL, accessible by clicking `Frontend Editing` in the Wagtail userbar. Keep an eye on that userbar! It is also used for publishing if your model inherits from `DraftStateMixin`.

**Note:** If the parent block is wrapped with `{% fedit block %}` or `{% fedit field %}` passing in the instance variable and field name should be omitted and replaced with `from_context`.
Example: `{% fedit block from_context block=item block_id=item.id %}`
The parent- blocktag will share these variables through context.
This makes it possibly to easily use editable sub-blocks across multiple different model types.
If your model **ISN'T** capable of editing; or these variables aren't shared - your block will be rendered as normal.

## Permissions

**Note: This is not required for pages.**
Expand Down Expand Up @@ -191,12 +198,6 @@ Our new loop would then be:
{% endfor %}
```

**Note:** If the parent block is wrapped with `fedit block` or `fedit field` passing in the instance variable and field name should be omitted and replaced with `from_context`.
Example: `{% fedit block from_context block=item block_id=item.id %}`
The parent- blocktag will share these variables through context.
This makes it possibly to easily use editable sub-blocks across multiple different model types.
If your model **ISN'T** capable of editing; or these variables aren't shared - your block will be rendered as normal.

## Hooks

### wagtail_fedit.construct_block_toolbar
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = wagtail_fedit
version = 1.4.6
version = 1.4.7
description = Frontend editing for your Wagtail site
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 0a45607

Please sign in to comment.