Skip to content

Commit

Permalink
Use the default WAGTAILMEDIA settings in README
Browse files Browse the repository at this point in the history
as per #210
  • Loading branch information
zerolab committed Jul 12, 2023
1 parent aa76838 commit 8736402
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,40 @@ INSTALLED_APPS = [
]
```

All wagtailmedia settings are defined in a single `WAGTAILMEDIA` dictionary in your settings file:
All wagtailmedia settings are defined in a single `WAGTAILMEDIA` dictionary in your settings file. The
defaults are:

```python
# settings.py

WAGTAILMEDIA = {
"MEDIA_MODEL": "", # string, dotted-notation. Defaults to "wagtailmedia.Media"
"MEDIA_MODEL": "wagtailmedia.Media", # string, dotted-notation.
"MEDIA_FORM_BASE": "", # string, dotted-notation. Defaults to an empty string
"AUDIO_EXTENSIONS": [], # list of extensions
"VIDEO_EXTENSIONS": [], # list of extensions
"AUDIO_EXTENSIONS": [
"aac",
"aiff",
"flac",
"m4a",
"m4b",
"mp3",
"ogg",
"wav",
], # list of extensions
"VIDEO_EXTENSIONS": [
"avi",
"h264",
"m4v",
"mkv",
"mov",
"mp4",
"mpeg",
"mpg",
"ogv",
"webm",
], # list of extensions
}
```

`AUDIO_EXTENSIONS` defaults to "aac", "aiff", "flac", "m4a", "m4b", "mp3", "ogg" and "wav".
`VIDEO_EXTENSIONS` defaults to "avi", "h264", "m4v", "mkv", "mov", "mp4", "mpeg", "mpg", "ogv" and "webm".

### URL configuration

Your project needs to be set up to serve user-uploaded files from `MEDIA_ROOT`.
Expand Down

0 comments on commit 8736402

Please sign in to comment.