From 413701696571b757f62ea20be6354028795c9fdb Mon Sep 17 00:00:00 2001 From: Jan-Pieter Baert Date: Wed, 13 Feb 2019 20:37:07 +0100 Subject: [PATCH] added a script to run haldis locally + README update --- README.md | 14 +++++++++----- localhost.sh | 11 +++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100755 localhost.sh diff --git a/README.md b/README.md index 5cd8edd..1950e0a 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,12 @@ Local hosting steps =================== 0. This is a Python 3 project so make sure to use python 3 and pip3 everywhere 1. Run `pip install -r requirements.txt` -2. Copy `config.example.py` to `config.py` -3. Copy the python files from `database/` to `app/` (yes, it's sad, I know) -4. Run `python create_database.py` in `app/` (if you want to fill the DB with sample data be sure to answer `Y` to `Do you still want to add something?`) -5. Run `rm -f add_admins.py* add_oceans_garden.py* add_simpizza.py* create_database.py*` in `app/` -6. Run `python haldis.py runserver` +2. `cd app` +3. Copy `config.example.py` to `config.py` +4. Copy the python files from `database/` to `app/` (yes, it's sad, I know) +5. Run `python create_database.py` in `app/` (if you want to fill the DB with sample data be sure to answer `Y` to `Do you still want to add something?`) +6. Run `rm -f add_* create_database.py*` in `app/` +7. Run `python haldis.py runserver` + +--- +Or run `./localhost.sh` in the root of the git folder \ No newline at end of file diff --git a/localhost.sh b/localhost.sh new file mode 100755 index 0000000..41bd991 --- /dev/null +++ b/localhost.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# A simple file to run all instructions from the README +## this should be run in the root of the repository +pip install -r requirements.txt +cd app +cp config.example.py config.py +cp -t . database/* +python3 create_database.py +rm -f add_* create_database.py +python3 haldis.py runserver +cd ..