From 640ff61422bc0ee3966941b93d9889ddbbd38d77 Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Thu, 30 Jul 2026 18:17:14 -0600 Subject: more files --- README.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index de98247..a759fac 100644 --- a/README.md +++ b/README.md @@ -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``` -- cgit v1.3