Developer Installation Guide - schoolofcities/zoetrope GitHub Wiki
Prereqs: git, Python 3.6 or later
This is the developer installation guide for Zoetrope, to help you run Zoetrope locally on your own machine.
-
Clone the repository from Github, i.e. in your chosen terminal,
git clone https://github.com/schoolofcities/zoetrope.git
-
In terminal, set up a working environment using conda or virtualenv:
- Using Conda:
- Create the environment:
conda create --name zoetrope-env
- Activate the environment:
conda activate zoetrope-env
- Install pip to the conda environment:
conda install pip
- Navigate to the location of the requirements.txt file, and then install packages from file:
pip install -r requirements.txt
- Check that the packages were installed into the environment correctly with:
conda list
- It is recommended to install the required packages into the conda environment using pip instead of conda because some of the packages are not readily available through conda
- Create the environment:
- Using virtualenv:
- Install virtualenv using
pip install virtualenv
- Create a virtual environment:
virtualenv zoetrope-venv
- Activate the venv:
source venv/bin/activate
(Linux/MacOS) ORsource venv/Scripts/activate
(Windows) - Install the packages from file:
pip install -r requirements.txt
- Install virtualenv using
- In either case, if installing the packages from the
requirements.txt
fails, install the packages individually using pip or conda.
- Using Conda:
-
Create or modify the
.env
file in the same directory asmanage.py
, containing the following variables (guide for python-dotenv):- make sure
DEBUG = 1
- ZOE_SECRET_KEY
- generate a value using
django.core.management.utils.get_random_secret_key
- generate a value using
- GMAIL_PASS
- contact maintainer (include what OS you are running)
- Request API Key from maintainer or create your own and assign to the following variables:
- GOOGLE_SV_KEY
- GOOGLE_MAPS_KEY
- Note: Create a single key with the Geocoding API, Maps JavaScript API, and Street View Static API enabled, then reuse it for both variables above.
- Use this guide to get values for the following variables:
- AMAZON_S3_BUCKET_NAME
- AMAZON_S3_ACCESS_KEY_ID
- AMAZON_S3_SECRET_ACCESS_KEY
- make sure
-
Create a database by running
manage.py
in terminal:- First check for changes:
python manage.py makemigrations
- Then create the database:
python manage.py migrate
- First check for changes:
-
Run development server in terminal:
python manage.py runserver
-
Go to link specified in the terminal.