Wagtail, the cms based on django.
$ docker build -t hbrls/wagtail:{version} .
For most of the time, you will continue to install app-specific dependencies. So I left the USER root there. Before you start you final app, you should set it to USER www-data.
RUN sed "s/#logformat/$(cat /path/to/uwsgi-logformat.yaml)/" /uwsgi.yaml to use your customized logformat.
appl, the opinionated best practice?Initialized database
$ mysql> CREATE DATABASE wagtailexample CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
$ mysql> CREATE USER 'wagtailexample'@'%' IDENTIFIED BY 'wagtailexample';
$ mysql> GRANT ALL PRIVILEGES ON wagtailexample.* TO 'wagtailexample'@'%'
$ mysql> FLUSH PRIVILEGES;
$ wagtail start appl
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser # wagtail:wagtail, [email protected]
$ python manage.py collectstatic
Change the default home page to our own ~/home/models.IndexPage.
Welcome to wagtail 下新建 IndexPage,然后将它转移到 Root 下IndexPageAdd example of page/subpage hierarchy
Root
Welcome to wagtail
首页 <- the in facto root
博客文章列表
博客文章列表
一类文章
二类文章
关于我们
Add example of WhateverPage and AgreementPage. The Hallo.js Wagtail 1.5.3 is using doesn't support <h1>. Waiting for the next major release.
~/templates for templates.
~/static is the destination of assets.
DJANGO_ENV: 'dev', 'sit', 'prod', ... to distinguish deploy environments.
The code (e.g. ~/home/models.py, ~/blog/models.py) provide Page Types to be used. The structure (i.e. site map) is up to your settings from the admin panel.
You would be requested a bunch of carefully-designed-hard-coded-pages. Just list their empty classes in ~/home/models.py (e.g. About) and do the hard code and admin panel settings.
For do-whatever-you-like pages, just choose ~/home/models.Whatever in the admin panel. You can also customize your own class like ~/home/models.Agreement for a set of similar whatever pages.
ALTER TABLE wagtailexample.wagtailcore_pageviewrestriction ADD restriction_type VARCHAR(20) DEFAULT 'password' NULL;
ALTER TABLE wagtailexample.wagtailusers_userprofile ADD preferred_language VARCHAR(10) NULL;
ALTER TABLE wagtailexample.wagtailcore_page ADD last_published_at DATETIME(6) NULL;
ALTER TABLE wagtailexample.wagtailcore_page ADD live_revision_id INT(11) NULL;
ALTER TABLE wagtailexample.wagtailcore_page ADD draft_title VARCHAR(255) NULL;
Content type
Image
Digest
Size
236.6 MB
Last updated
about 6 years ago
docker pull hbrls/wagtail