This Django project template is designed for creating Wagtail builds quickly, intended for developers to bootstrap their Wagtail site development using wagtail start --template=
. The template comes with pre-defined pages, blocks, functionalities, and fixtures to streamline the initial setup process.
- Update fixtures and images to be more generic
- Add some form of linting
- Load in fonts locally
- Add CI tasks
- Finish or alter the footer's signup feature to link to a form page
- Add support for wagtail search promotions
- Style the related pages slideshow component
- Accessibility,
- Resolve contrast issues with button component
- Windows High-Contrast mode support
- Style other block types
- Style other field types for form page
-
Create a Virtual Environment: Set up a virtual environment to isolate your project dependencies.
pyenv virtualenv 3.8 myproject pyenv activate myproject
-
Install Wagtail: Install the Wagtail CMS package using pip.
pip install wagtail
-
Initialize Project: Use the Django
startproject
command to create a new project based on the Wagtail Starter Kit template.wagtail start myproject --template=<<path or git url>>
-
Navigate to Project Directory: Move into the newly created project directory.
cd myproject
-
Load Dummy Data: Optionally load in some dummy data, to populate the site with some content.
make load-data
-
Start the Server: Start the Django development server.
make start
-
Access the Site and Admin: Once the server is running, you can view the site at
localhost:8000
and access the Wagtail admin interface atlocalhost:8000/admin
. Log in with the default credentials provided by :- Username: admin
- Password: password
To customize this template for your specific project needs, follow these steps:
- Create a new project using the provided instructions in the Getting Started section.
- Make changes and customizations within the new project.
- Once you've completed your modifications, backport them to the original template. You can do this manually or by replacing occurrences of
myproject
with{{ project_name }}
including the name for the app folder withproject_name
(without double curly brackets). before transferring the updated code to the root repository. - Template files (.html), have to be modified using
templatetag openblock
. It may be easier to alter the root directory directly instead, however a general rule is to replace opening template tags withtemplatetag openblock
and closing tags withtemplatetag closeblock
, similary double curly braces will need to be replaced withtemplatetag openvariable
. - Copy any static assets accross using
npm run build:prod
and./manage.py collectstatic
. - Update fixtures using
make dump-data
Happy coding with Wagtail! If you encounter any issues or have suggestions for improvement, feel free to contribute or open an issue.