Repository navigation
Mtb Map Setup
In case you have installed base software components successfully, you can continue setting up this project with this instructions.
Clone project source files directly from this repository:
git clone https://github.com/mattesCZ/mtbmap.git
Navigate to the project directory. There are several application directories and configuration directory mtbmap/settings. There are multiple settings modules. base.py is the one that all other inherit from. To be able to run the project, create file secrets.json with secret parameters:
// secrets.json example
{
"SECRET_KEY": "django_app_secret_key",
"DB_PASSWORD": "database_password",
"DB_USER": "database_user_name"
}
As you can see in base.py, we need two databases for our project. First to store basic apps data (default), second to store geographic data, which should be updated regularly (osm_data).
If you don't have your own database user, create it as user postgres:
createuser username # create also superuser, set password
Default database
createdb -U username -E UTF8 mtbmap_default
psql -d mtbmap_default -c "CREATE EXTENSION postgis"
Geodata database
createdb -U username -E UTF8 mtbmap_data
psql -d mtbmap_data -c "CREATE EXTENSION postgis"
With routing app installed, add extension PgRouting:
psql -d mtbmap_data -c "CREATE EXTENSION pgrouting"
You can set database names of your choice.
python manage.py syncdb
python manage.py syncdb --database=osm_data
python manage.py loaddata map/fixtures/*.json
Now you should be able to start development server python manage.py runserver and open http://127.0.0.1:8000/ in your favourite browser. You should see our MTB Map tiles and web interface. Great, but no other functions seems to work, huh? Let's generate map...