This short recipe demonstrates how to create Wagtail pages programmatically. It may also be useful for testing Wagtail development against a reasonable volume of page data (about 35,000 film plots, from English Wikipedia).
In a virtualenv:
import logging | |
import urllib.request | |
import boto3 | |
from settings import OBJECT_STORAGE_KEY, OBJECT_STORAGE_SECRET, OBJECT_STORAGE_REGION, OBJECT_STORAGE_BUCKET | |
logger = logging.getLogger(__name__) | |
s3config = { | |
"region_name": OBJECT_STORAGE_REGION, | |
"endpoint_url": "https://{}.digitaloceanspaces.com".format(OBJECT_STORAGE_REGION), |