MetroWeb is a Django site, used as a web interface for the Metropolis simulator.
- Install prerequisites:
Python3
,PostgreSQL
andPostGIS
. - Clone the repository with
git clone https://github.com/aba2s/Metropolis && cd Metropolis
. - Setup a Python virtual environment with
virtualenv -p /usr/bin/python3 venv
. - Activate the virtual environment with
source ./venv/bin/activate
. - Install required Python packages with
pip install -r requirements.txt
. - Create a PostgreSQL user and database.
- Create a
settings.json
file in the current directory with the following content:
{
"debug": true,
"secret_key": "YOUR_SECRET_KEY",
"database": {
"name": "DB_NAME",
"user": "DB_USER",
"password": "DB_PASSWORD"
}
}
- Migrate the database with
python3 manage.py makemigrations metro_app
andpython3 manage.py migrate
. - Run the server with
python3 manage.py runserver
.