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 (which should be used in development only)
DJANGO_SECRET_KEY=your_secret_key
DJANGO_DEBUG=True
DJANGO_ALLOWED_HOSTS=127.0.0.1 localhost
DJANGO_EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
DJANGO_LOG_LEVEL=DEBUG
- 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 custom template 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, the link changes to the location of the file in the
/static/
folder
- In debug mode, this creates a link directly to the Vite dev server normally located at
For more information, please read the README.
Install the JavaScript package using npm install
npm install
The development mode will run the test page at http://localhost:5173
npm run dev
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