This is the Backend for TEQST
python3 -m venv TEQST_Backend/venv
source TEQST_Backend/venv/bin/activate
TEQST_Backend\venv\Scripts\activate.bat
pip3 install -r TEQST_Backend/requirements.txt
In TEQST/setup_templates you will find templates for the requires localsettings.py file. This file is gitignored and holds settings which are specific to your local project. Place it next to settings.py inside the TEQST/TEQST folder. A random secret key ycan be generated using the command "python manage.py newsecretkey". More Information is in the template files.
python3 manage.py makemigrations usermgmt textmgmt recordingmgmt
python3 manage.py migrate
Use the command "python manage.py setup". It will do the following:
- Get or create the publisher group
- Guide you through creating a superuser
- Gives you the option to add the superuser to the publisher group
creating a superuser via the createsuperuser utility is currently not possible due to additional required attributes in the user class. You have to create a user via the shell like so:
python3 manage.py shell
from usermgmt.models import CustomUser
CustomUser.objects.create_superuser('username', password='password', birth_year=2000, country='DEU', accent='Badisch')
Next, create a publisher group. This can be done in the admin interface or in the shell with for example:
from django.contrib.auth import models as auth_models
auth_models.Group.objects.get_or_create(name='Publisher')
python3 manage.py runserver
python3 manage.py test
if the python3 name doesnt work on your machine try python instead but make sure (with python --version) that this calls a 3.x python. Same goes for pip3 and pip