diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 31 |
1 files changed, 27 insertions, 4 deletions
@@ -1,5 +1,28 @@ -# far_edge_ops_api +# Installation -This is a Python application using the Django web framework. It was -written for a project at Verizon. It is here as a code sample for -potential hiring managers. +## 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``` |
