diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-04-28 09:55:25 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-07-29 11:54:14 +0200 |
commit | d552436e1847fc7541d1abe643c5fed67109bae6 (patch) | |
tree | 8959fe77756ed8db59dcada5de146d1427030b9a /DEVELOP.md | |
parent | f5e7db4f7b3bceb0cdef84f9530e0cddc67beea8 (diff) | |
download | Ishtar-d552436e1847fc7541d1abe643c5fed67109bae6.tar.bz2 Ishtar-d552436e1847fc7541d1abe643c5fed67109bae6.zip |
WIP: preventive forms
Diffstat (limited to 'DEVELOP.md')
-rw-r--r-- | DEVELOP.md | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/DEVELOP.md b/DEVELOP.md index f7398ba26..e91ca3ccf 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -3,11 +3,12 @@ Installation instruction for a debian buster with sudo. ### Install base source code -``` +``` bash sudo apt-get update -sudo apt-get install git sed python3-pip libpq-dev python3-dev libjpeg-dev zlib1g-dev \ - libxml2-dev libxslt1-dev libgeos-dev python3-cairocffi tidy libtidy-dev binutils \ - libproj-dev gdal-bin libpangocairo-1.0-0 pandoc graphviz +sudo apt-get install git sed python3-venv python3-wheel python3-pip libpq-dev \ + python3-dev libjpeg-dev zlib1g-dev libxml2-dev libxslt1-dev libgeos-dev \ + python3-cairocffi tidy libtidy-dev binutils libproj-dev gdal-bin \ + libpangocairo-1.0-0 pandoc graphviz gettext cd my_workspace python3 -m venv ishtar-venv @@ -19,18 +20,22 @@ pip3 install -r requirements.txt ### Install postgresql database -``` -apt install postgresql postgresql-contrib postgresql-11-postgis-2.5 \ +``` bash +sudo apt install postgresql postgresql-contrib postgresql-11-postgis-2.5 \ postgresql-11-postgis-2.5-scripts sudo -u postgres psql +``` + +``` sql CREATE DATABASE ishtar; CREATE USER ishtar WITH ENCRYPTED PASSWORD 'mypassword'; GRANT ALL PRIVILEGES ON DATABASE ishtar TO ishtar; +ALTER ROLE ishtar superuser; ``` ### Configure and initialize your instance -``` +``` bash cd my_workspace . ./ishtar-venv/bin/activate cd ishtar @@ -38,7 +43,22 @@ ISHTAR_PATH=`pwd` cp example_project/local_settings.py.sample example_project/local_settings.py editor example_project/local_settings.py # edit settings: SECRET_KEY, DATABASE +``` + +``` python +DATABASES = { + 'default': { + 'NAME': 'ishtar', + 'ENGINE': 'django.contrib.gis.db.backends.postgis', + 'HOST': '127.0.0.1', + 'PORT': '5432', + 'USER': 'ishtar', + 'PASSWORD': 'mypassword', + }, +} +``` +``` bash cd example_project # collect static data python3 ./manage.py collectstatic --noinput |