Fitness diary platform developed for Slovak U17 Woman's national team.
- Python (3 or later, version 3.6.0 recommended)
- Django (version 2.0)
- virtual enviroment
Install Python from https://www.python.org/downloads/ and then in CMD type:
py -m pip install Django==2.0
py -m pip install virtualenv
In Bash type:
sudo apt install pip
python3 -m pip install Django==2.0
python3 -m pip install virtualenv
You have to get through local setup only once (per a project).
In CMD:
Create virtual enviroment
py -m venv ENV_NAME
or simply execute setup\windows-setup.bat
file.
In Terminal:
Create virtual enviroment
virtualenv -p python3 ENV_NAME
and allow remote acces for desired port:
iptables -I INPUT -p tcp -m tcp --dport PORT_NUMBER -j ACCEPT
Make and then apply migrations. You can do it by typing:
manage.py makemigrations diary
manage.py migrate
to your CMD or Bash in matikgp
directory.
In CMD:
- Go to matikgp directory
- Activate your virtual environment:
ENV_NAME\Scripts\activate
- Run server on your desired port:
python manage.py runserver 0.0.0.0:PORT_NUMBER
or simply execute setup\windows-run.bat
file (removes data from files above too).
- Login as root user
In Terminal:
- Go to matikgp directory
- Activate your virtual environment:
source ENV_NAME/bin/activate
- Run server on your desired port:
python manage.py runserver 0.0.0.0:PORT_NUMBER
After all that you can access to admin site by typing localhost:PORT_NUMBER/admin
and to app by typing localhost:PORT_NUMBER/diary
(localhost
can be substituted by an IP address of server e.g. 192.168.1.47
).