This is the current stregsystem in the F-Klub.
master
: The running code on the live system.next
: The set of changes which will be included in the next release.
For windows using Anaconda and virtual environments:
- Download and install Anaconda
- In a shell:
conda create -n stregsystem python=3.11
activate stregsystem
pip install -r requirements.txt
- ???
- Profit
For Ubuntu with virtual envs:
- Install python3 with pip
sudo apt install python3 python3-pip python3-venv
- Create virtual environment
python3 -m venv venv
- Activate virtualenv
source venv/bin/activate
- Install packages
pip3 install -r requirements.txt
- ???
- Profit
For Mac users with virtual envs:
- Install python3.11 with pip
brew install [email protected]
- Create virtual environment
python -m venv venv
- Activate virtualenv
source venv/bin/activate
- Install packages
pip install -r requirements.txt
- ???
- Profit
In order to simplify development for all, we have included a test fixture.
Using testserver
will delete the data after running.
To use it do the following:
python manage.py migrate
python manage.py testserver stregsystem/fixtures/testdata.json
- ???
- Profit
Admin panel: http://127.0.0.1:8000/admin/
Login: tester:treotreo
Stregsystem: http://127.0.0.1:8000/1/
There are different members that help you test different things:
Member | Superpower |
---|---|
tester | Default test profile |
q | Has short name for maximum testing speed |
nodough | Has no stregdollars |
lowdough | Only has 15 stregdollars |
Using runserver
will automatically reload django on code change, and persist data in the database configured in local.cfg
(can be whatever backend you want to use).
First time:
python manage.py migrate
python manage.py loaddata stregsystem/fixtures/testdata.json
python manage.py runserver
- ???
- Profit
From then on
python manage.py runserver
- ???
- Profit
Using the debugging tool MailHog (Follow their README for install instructions) and test the mailserver like this:
MailHog --smtp-bind-addr 127.0.0.1:25
- Go to http://127.0.0.1:8025 in your browser
python manage.py runserver
- ???
- Profit