Django backend App with REST API (djangorestframework) to run on RaspberryPi and access I2C sensors.
pip3 install djangorestframework django-filter django_mysql
Open terminal on your workspace folder, run:
django-admin startproject (DjangoProject)
NOTE: Choose any name you want for your project and replace with (DjangoProject)
Open terminal on (workspace)/(DjangoProject), run:
git clone (thisRepoURL.git)
Open (workspace)/(DjangoProject)/(DjangoProject)/settings.py, find:
INSTALLED_APPS = [ ... ] , add:
-'rest_framework'
-'filter'
-'I2CSensors'
Open terminal on (workspace)/(DjangoProject), run:
python3 manage.py makemigrations
python3 manage.py migrate
Open terminal on (workspace)/(DjangoProject), run:
python3 manage.py createsuperuser
Enter Username and Password (Use a strong Password)