Skip to content

gisly/toponymic_project

Repository files navigation

Basic setup

In order to run this, you should have:

pip install virtualenv
python -m virtualenv venv

Running the db

Linux

docker run -dit \
  --name geoterms \
  -e POSTGRES_PASSWORD=password \
  -e POSTGRES_USER=app \
  -e POSTGRES_DB=geoterms \
  -p 54323:5432 \
  postgres

Windows

  1. Run Docker Desktop
  2. Run in the powershell
docker run -dit  --name geoterms   -e POSTGRES_PASSWORD=password   -e POSTGRES_USER=app   -e POSTGRES_DB=geoterms   -p 54323:5432   postgres

Running the backend

Linux

Create a virtual environment and add dependencies

python -m virtualenv venv;
source venv/bin/activate;
pip install -r requirements.txt;

Running the server

DJANGO_DEBUG=True DJANGO_TESTING=True python manage.py runserver 8001

Windows

Create a virtual environment and add dependencies

python -m virtualenv venv
cd venv
cd Scripts
cd ..
cd ..
activate
pip install -r requirements.txt

Running the server

  1. Set up the environment variables
    1. DJANGO_DEBUG=True
    2. DJANGO_TESTING=True
  2. Execute
python manage.py runserver 8001

Applying migrations

  1. Set up the environment variables
    1. DJANGO_DEBUG=True
    2. DJANGO_TESTING=True
  2. Execute
python manage.py migrate

Administration

  1. Run the database
  2. Run the server
  3. Create a supuser
python manage.py createsuperuser
  1. Enter http://127.0.0.1:8001/admin using the login and the password of the superuser

About

Toponymic project v2.0 containing toponymic data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published