Commit 1815e3f
committed
moving pages around envs
Changes Made
1. Removed wagtailimportexport/ — the entire vendored package directory
2. Added wagtail-transfer==0.11 to requirements/base.txt
3. Replaced wagtailimportexport with wagtail_transfer in INSTALLED_APPS (openstax/settings/base.py)
4. Added wagtail-transfer settings to base.py — configurable via env vars:
- WAGTAILTRANSFER_SECRET_KEY — this instance's auth key
- WAGTAILTRANSFER_SOURCE_NAME / _URL / _KEY — defines the source to pull from
5. Added URL route wagtail-transfer/ in openstax/urls.py (above the catch-all wagtail route)
What's Needed Next
Per-environment setup:
On each environment, set these env vars:
# On production — pull from staging
WAGTAILTRANSFER_SECRET_KEY=<prod-secret>
WAGTAILTRANSFER_SOURCE_NAME=staging
WAGTAILTRANSFER_SOURCE_URL=https://staging.openstax.org/wagtail-transfer/
WAGTAILTRANSFER_SOURCE_KEY=<staging-secret>
# On staging — the secret key must match what prod uses as SOURCE_KEY
WAGTAILTRANSFER_SECRET_KEY=<staging-secret>
The SECRET_KEY on the source must match the SOURCE_KEY configured on the destination.
Run migrations on each environment:
python manage.py migrate wagtail_transfer
Permissions: Superusers get access automatically. For other users, create a group with the "Can import pages and
snippets from other sites" permission.
Usage: In Wagtail admin, there will be a new "Import" option. You browse the source environment's page tree and
select what to pull in — no more zip files.1 parent ca817e7 commit 1815e3f
File tree
20 files changed
+26
-1166
lines changed- openstax
- settings
- requirements
- wagtailimportexport
- migrations
- templates/wagtailimportexport
- tests
20 files changed
+26
-1166
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
273 | 294 | | |
274 | 295 | | |
275 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments