From 16c751a8c47f8383a572d659f78366bbbae30e48 Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Wed, 15 Oct 2025 16:45:25 +0200 Subject: [PATCH 1/5] upgrade django --- backend/requirements.in | 2 +- backend/requirements.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/requirements.in b/backend/requirements.in index 25a97e55e..fe7800972 100644 --- a/backend/requirements.in +++ b/backend/requirements.in @@ -1,4 +1,4 @@ -Django>=4.0.1,<5 +Django>=5.2 djangorestframework dj-rest-auth[with_social] django-livereload-server diff --git a/backend/requirements.txt b/backend/requirements.txt index 30fd7b387..2b7ffa421 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --cert=None --client-cert=None --index-url=None --pip-args=None +# pip-compile # amqp==5.3.1 # via kombu @@ -54,9 +54,9 @@ defusedxml==0.7.1 # djangosaml2 # pysaml2 # python3-openid -dj-rest-auth[with-social,with_social]==4.0.1 +dj-rest-auth[with-social]==4.0.1 # via -r requirements.in -django==4.2.25 +django==5.2.7 # via # -r requirements.in # dj-rest-auth From 72d4ee9ef5c8e7b785ef4f83cecd0853bb5506c1 Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Wed, 15 Oct 2025 17:46:46 +0200 Subject: [PATCH 2/5] update postgres version in prerequisites --- documentation/First-time-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/First-time-setup.md b/documentation/First-time-setup.md index 10afc18ae..b418dba57 100644 --- a/documentation/First-time-setup.md +++ b/documentation/First-time-setup.md @@ -5,7 +5,7 @@ These are instructions to set up an I-analyzer server. If you are going to devel ## Prerequisites * Python == 3.12 -* PostgreSQL >= 12, client, server and C libraries +* PostgreSQL >= 14, client, server and C libraries * [ElasticSearch](https://www.elastic.co/) 8. To avoid a lot of errors, choose the option: install elasticsearch with .zip or .tar.gz. ES wil install everything in one folder, and not all over your machine, which happens with other options. * [Redis](https://www.redis.io/). Recommended installation is [installing from source](https://redis.io/docs/getting-started/installation/install-redis-from-source/) * [Node.js](https://nodejs.org/). See [.nvmrc](/.nvmrc) for the recommended version. From 6380053b856a6965b516c67c992fd5e1d1006c36 Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Wed, 15 Oct 2025 18:10:18 +0200 Subject: [PATCH 3/5] document extra psql command --- documentation/First-time-setup.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/documentation/First-time-setup.md b/documentation/First-time-setup.md index b418dba57..fcd58b178 100644 --- a/documentation/First-time-setup.md +++ b/documentation/First-time-setup.md @@ -30,6 +30,16 @@ yarn postinstall psql -f backend/create_db.sql yarn django migrate ``` + +> [!NOTE] +> With Postgresql 15 later, you may need to grant privileges on the schema too. Use the `psql` command in the terminal, and run the following: +> +> ``` +> \c ianalyzer +> grant all privileges on all tables in schema public to ianalyzer; +> ``` +> + 5. Make a superuser account with `yarn django createsuperuser` ## Setup with Docker From 08ddbd1e8d013be66bc1e759c33d9c9547339d42 Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Wed, 15 Oct 2025 18:15:03 +0200 Subject: [PATCH 4/5] add empty csp handler for development --- backend/ianalyzer/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/ianalyzer/settings.py b/backend/ianalyzer/settings.py index c4421b33b..627665b32 100644 --- a/backend/ianalyzer/settings.py +++ b/backend/ianalyzer/settings.py @@ -124,3 +124,5 @@ 'No local settings file - configure your environment in backend/ianalyzer/settings_local.py', Warning ) + +SAML_CSP_HANDLER = '' From 81e64c26a4d01300cddf5c3d485fc87e156f67f6 Mon Sep 17 00:00:00 2001 From: Luka van der Plas Date: Wed, 15 Oct 2025 18:24:36 +0200 Subject: [PATCH 5/5] move line --- backend/ianalyzer/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/ianalyzer/settings.py b/backend/ianalyzer/settings.py index 627665b32..53246896a 100644 --- a/backend/ianalyzer/settings.py +++ b/backend/ianalyzer/settings.py @@ -116,6 +116,8 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'data') +SAML_CSP_HANDLER = '' + # This needs to be the last line of the settings.py, so that all settings can be overridden. try: from ianalyzer.settings_local import * @@ -125,4 +127,3 @@ Warning ) -SAML_CSP_HANDLER = ''