summaryrefslogtreecommitdiff
path: root/DEVELOP.md
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-04-28 09:55:25 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:47 +0200
commitfd232fdba395c96564934052233dd23604082693 (patch)
tree5284082668976459d1b304532f883aad0f8044a9 /DEVELOP.md
parentde4a4dc7b9d7a227a4e48323db878c3db156389c (diff)
downloadIshtar-fd232fdba395c96564934052233dd23604082693.tar.bz2
Ishtar-fd232fdba395c96564934052233dd23604082693.zip
WIP: preventive forms
Diffstat (limited to 'DEVELOP.md')
-rw-r--r--DEVELOP.md34
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