VOKO
Django based custom web application for food collective www.vokoutrecht.nl.
![example workflow](https://github.com/VOKO-Utrecht/voko/actions/workflows/ci.yml/badge.svg)
Some notes
- The code base needs cleaning up and adding of tests.
- License: GNU GPLv3
- Use at your own risk, no support.
Development environment using Docker
Get the code
- Run:
git clone https://github.com/VOKO-Utrecht/voko.git
- Run: cd voko
Initiate the database
- Run: docker-compose up db
- Wait until db is ready to accept connections
- Press CTRL-C to stop the db container again
first time postgress restarts which confuses Django
Start voko website and run migrations
- Run: docker-compose up -d
- Run: docker exec -it voko_web_1 bash
- Run: ./manage.py makemigrations --settings=vokou.settings.development
- Run: ./manage.py migrate --settings=vokou.settings.development
- Run: exit
Create superuser in the voko web container
- Run: docker exec -it voko_web_1 bash
- Run: ./manage.py createsuperuser --settings=vokou.settings.development
- follow the prompts
- Run: exit
In your browser go to: http://127.0.0.1:8000/admin/ordering/orderround/
Login as the super user just created \
Use the admin site to create an order round (otherwise you get an ugly error going to the main site --FIXTHIS)
Development environment without Docker
- Run: pip install --user pipenv
- Run:
git clone https://github.com/VOKO-Utrecht/voko.git
- Run:
cd voko
- Run:
pipenv install --dev
- Run:
pipenv shell
- In vokou/settings/development.py: \
- Uncomment config for sqlite3 \
- Comment the config for postgresql
Set up sqlite database
cd webapp
./manage.py migrate --settings=vokou.settings.development
./manage.py createsuperuser --settings=vokou.settings.development
Run tests
cd webapp
./runtests.sh
Run development server
cd webapp
./manage.py runserver --settings=vokou.settings.development
Adding user
- Register as new user at: http://localhost:8000/accounts/register/
- Look up the confirmation token at: http://localhost:8000/admin/accounts/emailconfirmation/
- Visit (replace TOKEN with copied token): http://localhost:8000/accounts/register/confirm/TOKEN
- Log in as superuser and go to user admin: http://localhost:8000/admin/accounts/vokouser/
- Select your user, choose in dropdown: "Gebruikersactivatie na bezoek info-avond", click "Uitvoeren" button
- Log out as superuser, or visit the next link incognito (replace TOKEN with copied token): http://localhost:8000/accounts/register/finish/TOKEN
- Fill in fields and submit
Marking member as sleeping member
- Go to http://localhost:8000/admin/accounts/vokouser/
- Select user
- Choose in dropdown: "Anonimiseer account"
- Click "Uitvoeren" button
Re-activating sleeping member
- Go to http://localhost:8000/admin/accounts/sleepingvokouser/
- Open user
- De-tick "Sleeping (inactive) member"
- click "OPSLAAN" button