Skip to content

Commit

Permalink
Add "wagtail.snippets" to INSTALLED_APPS and document the need for this
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Babic committed Feb 25, 2024
1 parent 620685c commit 3beb5d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,22 @@ plus blocks and chooser widgets to help use them in your project. However, becau
and project-specific requirements around video usage can be a little more custom,
the model is `abstract` - you need to subclass it in order to use the functionality.

First, import the abstract `BynderSyncedVideo` model and subclass it within your project to create a concrete model.
First, ensure you have `wagtail.snippets` in your project's `INSTALLED_APPS`:

```python: highlight-line=7
INSTALLED_APPS = [
# ...
"wagtail.users",
"wagtail.admin",
"wagtail.documents",
"wagtail.images",
"wagtail.snippets",
"wagtail",
# ...
]
```

Next, import the abstract `BynderSyncedVideo` model and subclass it within your project to create a concrete model.
For example:

```python
Expand All @@ -105,7 +120,7 @@ class Video(BynderSyncedVideo):
pass
```

Next, in your project's Django settings, add a `BYNDER_VIDEO_MODEL` item to establish your custom model as the 'official'
Then, in your project's Django settings, add a `BYNDER_VIDEO_MODEL` item to establish your custom model as the 'official'
video model. The value should be a string in the format `"app_label.Model"`. For example:

```python
Expand Down
1 change: 1 addition & 0 deletions tests/testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"wagtail.images",
"wagtail.admin",
"wagtail.sites",
"wagtail.snippets",
"wagtail",
"taggit",
"django.contrib.admin",
Expand Down

0 comments on commit 3beb5d0

Please sign in to comment.