Membership teknologr/management system tailored for TF use
Clone the repository, go into the root directory of the project and do the following:
-
Install prerequisites
sudo apt install libsasl2-dev python3-dev libldap2-dev libssl-dev libpq-dev pip install virtualenv
-
Create a virtual environment
virtualenv -p /usr/bin/python3 venv
-
Activate said virtual enviroment. You need to do this for every new session.
source venv/bin/activate
-
Install prerequisites with pip
pip install -r requirements.txt
-
Create a .env file
cp teknologr/.env.example teknologr/.env
During development you probably want to set
DEBUG=True
, and you might need to at least change the database location too to get it work out of the box. I suggest you remove theDATABASE=...
completely to use the default database path (teknologr/db.sqlite3
). -
Make sure you have the correct locale available on your system. The default locale used by Teknologr.io is
sv_FI.utf8
.sudo locale-gen sv_FI.utf8 sudo update-locale
-
Run migrations to update the database schema
python teknologr/manage.py migrate
-
Create a new superuser account
python teknologr/manage.py createsuperuser
-
You are now ready to run an instance of Teknologr.io
python teknologr/manage.py runserver
View the page in your browser at
http://localhost:8000
. The admin site can be found athttp://localhost:8000/admin
.
There is a number of unittests in files named tests_*.py
. To run all the tests:
python teknologr/manage.py test
To run only a specific test:
python teknologr/manage.py test members.tests_models.GroupTest
A certain code style is required. Run the PEP8 test to check the style:
python teknologr/manage.py test teknologr.tests_pep8