Skip to content

FahrplanDatenGarten/FahrplanDatenGarten

Repository files navigation

FahrplanDatenGarten

#FahrplanDatenGarten on matrix.org

We ❤️ Deutsche Bahn

Used API's

  • HAFAS

Setup

Init and Update git-submodules

git submodule init
git submodule update

Install Debian Requirements (only on debian systems)

sudo apt install python3-dev python3-venv

Set up the VEnv (optional, but recommended)

Using an VEnv will help you to avoid dependency-(version)-conflicts.

python3 -m venv .venv
source .venv/bin/activate

You can deactivate the VEnv, by simply running deactivate. If you want to re-enable the VEnv later, simply run source .venv/bin/activate again.

Install python dependencies

pip install -U -r requirements.txt

Set up the database

Copy .env.example to .env and change the database block.

Migrate your database

This and all later commands will have to be run from inside the folder FahrplanDatenGarten.

python manage.py migrate

Import Stations from DB

python manage.py dbapis_importstations

Import Timetable from DB (optional)

python manage.py dbapis_timetable {StationName}

Update Journeys (optional)

python manage.py dbapis_journey

Start Webserver

python manage.py runserver

The Webserver now runs under http://127.0.0.1:8000/