git clone [email protected]:emmakuppart/toyrem-api.git
python3 -m pip install --user --upgrade pip
python3 -m pip install --user virtualenv
python3 -m venv env
source env/bin/activate
deactivate
pip install django
pip install djangorestframework
pip install psycopg2 (või psycopg2-binary) (Postgres andmebaas)
pip install Pillow (piltide haldus)
pip install django-cors-headers (Päringuvõltsingu kaitse)
pip install pymemcache (sessioonid)
pip install django-apscheduler (taustaprotsessid)
pip install requests (Veebipäringud)
python manage.py runserver
python manage.py makemigrations
python manage.py migrate api --run-syncdb --fake
python manage.py createsuperuser
docker-compose up
python manage.py runapscheduler
Kui tekib error "env/bin/python3: bad interpreter: No such file or directory", siis tasub virtuaalkeskkond lähtestada.
https://medium.com/swlh/build-your-first-rest-api-with-django-rest-framework-e394e39a482c
https://bezkoder.com/django-rest-api/
https://docs.djangoproject.com/en/3.2/topics/http/sessions/