From c229413f49dd941f2c56077759e721de0fe42e1f Mon Sep 17 00:00:00 2001 From: corbz Date: Mon, 8 Jan 2024 23:42:28 +0000 Subject: [PATCH] Update README.md --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 327ccaf..9ceeff8 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,64 @@ # Contributing +This guide explains how to contribute. + +## Requirements + +Django and other related libraries aren't included with python by default, and need to be installed: + +1. Setup a python virtual environment + + `python -m venv venv` + +2. Activate the virtual environment + + `source venv/bin/activate` (linux) + + `./venv/Scripts/activate.ps1` (windows) + +3. Install the pip dependencies + + `pip install -r requirements.txt` + ## Migrations -If facing migration errors, delete the contents of all `migrations` folders that are numerical (e.g. `0001_initial.py`) and delete the `db.sqlite3` database file. Note you will lose all data. +Migration files instruct the database on how to create tables and other entities. -To get started: +Migration files have already been created, you can import them with: -1. `python manage.py makemigrations authentication` -2. `python manage.py makemigrations home` -3. `python manage.py migrate` +`python manage.py migrate` -## Run the server +If you make changes to the models, you will need to update the migrations: -`python manage.py runserver 0.0.0.0:8000` +Available app names are: -## Access the website +- "home" +- "authentication" -`http://localhost:8000` +`python manage.py makemigrations ` +## Fixtures + +Fixtures allow you to import default data into the database. +They is very useful for testing purposes. + +The following fixture options are available: + +- `authentication/defaultuser.json` add some default users ( & , password=password) +- `authentication/department.json` add some default departments +- `home/ticketpriority.json` add some default ticket priorities +- `home/tickettag.json` add some default ticket tags + +You can import a fixture using the following command (remember to replace `