nhsx / nhsx-website

NHSX Website - built with Wagtail
https://transform.england.nhs.uk
MIT License
37 stars 12 forks source link

NHSX Wagtail

A Wagtail implementation of the NHSX website.

Development

Prerequisites

Getting started

Clone the repository:

git clone https://github.com/nhsx/nhsx-website.git

Run the setup script:

script/setup

This will create a docker-compose.env file, initialize the containers, run the migrations, and set up a superuser with the username admin@example.com and the password admin.

You can then run the site with the following command:

script/server

The site will then be available at "http://localhost:5000".

You may also want to give the site a sensible hostname. Open /etc/ hosts and add the following to make the site available at "http://nhsx.test:5000".

0.0.0.0    nhsx.test

Running the tests

The following script runs the tests:

script/test

For more on the approach to testing, see docs/testing.md

Other useful commands

To run the Wagtail console:

script/console

To generate migrations:

script/manpy makemigrations

To run migrations:

script/manpy migrate

You can also run a number of other manage.py scripts with the following command:

script/manpy COMMAND

Precommit hooks

You should run pre-commit init so that your code changes will be linted and not fail CI.

License

Released under the MIT license