The SORT provides a comprehensive self-assessment framework, enabling organisations to evaluate and strengthen their research capabilities within nursing and broader health and care practices. By guiding you through forty-four targeted statements, SORT helps assess your current level of research maturity and the support available for nurses involved in research. Upon completion, your organisation will be equipped to create a tailored improvement plan to better integrate research into nursing practice, ultimately contributing to improved patient care.
Follow these steps to set up and run the app locally:
Prerequisites, ensure the following are already installed on your system:
- Python 3.12
- pip
- Nodejs (20.x)
- Clone the project repository to your local machine
git clone <repository-url>
- Create and activate a virtual environment
python -m venv .venv
source .venv/Scripts/activate
- Install dependencies
# Install python requirements
pip install -r requirements.txt
# Install nodejs requirements
npm install
- Configure the database
python manage.py migrate
- Create a superuser
python manage.py createsuperuser
- Create a
.env
file in the project root directory and add the following environment variables:
DJANGO_SECRET_KEY=your_secret_key
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=127.0.0.1 localhost
- Finally, start the development server
python manage.py runserver
- Start the vite javascript server (in a different terminal)
npm run dev
The app will be available at http://127.0.0.1:8000.
- Import test data by following the instructions as
data/README.md
.
Please read docs/deployment.md
.
The SORT app uses some javascript components such as the survey configurator and the survey response form. This is implemented using the svelte framework and vite is used as the bundler. Vite also provides a live server for development which includes HMR (hot module reloading).
In order to integrate this into the html template, a tag library is created at /home/templatetags/vite_integration.py
.
- The
vite_client
template tag is used to include Vite's HMR javascript code. - The
vite_asset
tag is used to include asset files (e.g. typescript files) in the template.- In debug mode, this creates a link directly to the vite dev server normally located at
http://localhost:5173
- In production mode, it links to assets within the
/static/
url path.
- In debug mode, this creates a link directly to the vite dev server normally located at
The script files within /ui_components
must be built into the static folder before deployment. This
can be done by running:
npm run build
This will transpile the typescript files and write them into /static/ui-components/
folder.
Then run django's collectstatic
to gather all files into the static folder.
python manage.py collectstatic