cd %userprofile%/git/tasks_around_university
mkdir git
cd git
git clone https://github.com/JaliJuhola/tasks_around_university.git
- install git CLI -> https://git-scm.com/downloads
- https://www.python.org/downloads/release/python-370/
- upgrade pip
py -m pip install -U pip
- Start command prompt as adminstrator and
py -m pip install virtualenv
cd %userprofile%/git/tasks_around_university
py -m virtualenv tasks_around_university
tasks_around_university\Scripts\activate
pip install -r requirements.txt
- Instal node through https://nodejs.org/en/
- Restart computer
npm install -g expo-cli
in root directorynpm install
in git/tasks_around_university/tasks-around-university/android
- http://www.postgresqltutorial.com/install-postgresql/
- If you have docker installed you can also run docker-compose up in root directory
- run
python manage.py migrate
in git/tasks_around_university/tasks-around-university
python manage.py runserver
expo start
in git/tasks_around_university/tasks-around-university/android
- http://localhost:3000/mini_games/test
- At the beginning database is empty clicking Post you create new database object and clicking patch you add item to it.
- You can also observe this change in Django-shell by running
python manage.py shell
Example query:
from rest.hello_world.models import Counter
Counter.objects.count()
for item in Counter.objects.all():
item.__dict__
// In example you can get dictionary for item showing in testing site by
// Counter.objects.last().__dict__
// Changing it by
// c = Counter.objects.last()
// c.count = 9999
// c.save()
// now count in ui should be updated as well
- More about django queries in Django documentation