blob: a759fac2024fd0b3fb318c75fa747cf211d58b0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Installation
## Dependencies
* Python 3.7 +
* virtualenv
* Install postgresql and add pg_config to PATH
* Install Apache server (Alternatively, on a Mac, make sure you have xcode installed, which includes Apache server)
## Install Python requirements
Run the following commands in the root folder
* Create a virtual environment. ```python3 -m venv virt_env```
* Activate the virtual env ```source virt_env\bin\activate```
* Install python requirements ```pip3 install -r requirements.txt```
### Troubleshooting pip install errros on a Mac
* Install python 3.7 if you don't already have it. Latest xcode upgrades to 3.9, which does not work.
* psutil fails because of Mac architecture. Set env variable ```export ARCHFLAGS="-arch x86_64"```
* Update requirements.txt to install ```psycopg2-binary``` instead of ```psycopg2```
## Run Django migrations
* ```cd src```
* ```python3 manage.py migrate```
## Run Django application
* ```python3 manage.py runserver ```
## Register cronjobs for generating Dashboard reports
* Register - ```python3 manage.py crontab add```
|