Skip to content

Commit b008023

Browse files
committed
Setup for demo of Wagtail Unveil package in bakerydemo project.
1 parent fad0a2c commit b008023

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

DEMO-NOTES.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Wagtail Unveil Demo Notes
2+
3+
The files in this commit are the chnages I made to use the package in the bakery demo project.
4+
5+
Currently installed via `pip install git+`
6+
7+
## Changes made
8+
9+
- Added wagtail-unveil to `requirements/development.txt`
10+
- Added `wagtail_unveil.api_urls` to the bakerydemo `urls.py` (optional for JSON views)
11+
- Added local.py to for settings with the following content:
12+
13+
```python
14+
from .base import INSTALLED_APPS
15+
16+
INSTALLED_APPS += [
17+
'wagtail_unveil',
18+
]
19+
20+
# List of models to include in the Generic Models report
21+
# These should be models managed by ModelViewSet or other generic views
22+
WAGTAIL_UNVEIL_GENERIC_MODELS = ['breads.Country']
23+
24+
# List of Wagtail ModelAdmin models to include in the Wagtail ModelAdmin report
25+
# These should be models registered with Wagtail's ModelAdmin
26+
# WAGTAIL_UNVEIL_WAGTAIL_MODELADMIN_MODELS = ['core.ExampleWagtailModeladminModel']
27+
28+
# Maximum number of instances to include per model in unveil reports
29+
# WAGTAIL_UNVEIL_MAX_INSTANCES = 1 # optional, the default is
30+
31+
# Position the Unveil reports menu item in the Wagtail admin menu
32+
# WAGTAIL_UNVEIL_MENU_ORDER = 1 # optional, the default is 1
33+
34+
# Base URL for generating URLs in reports
35+
# This should be the base URL of your Wagtail site, e.g. "http://localhost:8000"
36+
# WAGTAIL_UNVEIL_BASE_URL = "http://localhost:8000"
37+
38+
# Token for accessing the JSON API endpoints
39+
# This is used for authentication when accessing the API endpoints.
40+
# Admin users can access the API without a token, but for external access, you should set this.
41+
WAGTAIL_UNVEIL_JSON_TOKEN = "1234"
42+
```
43+
44+
Followed the bakery demo instructions to set up the project and run the server, including loading the initial data.

bakerydemo/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
path("sitemap.xml", sitemap),
2626
path("api/v2/", api_router.urls),
2727
path("__debug__/", include(debug_toolbar.urls)),
28+
path("unveil/api/", include("wagtail_unveil.api_urls")),
2829
]
2930

3031

requirements/development.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ black==22.3.0
33
ruff==0.0.290
44
curlylint==0.13.1
55
djhtml==1.4.13
6+
wagtail-unveil @ git+https://github.com/nm-packages/wagtail-unveil.git

0 commit comments

Comments
 (0)