From 459287457cbe39e8d6069059ec4a1980d3a6244a Mon Sep 17 00:00:00 2001 From: Gytha Ogg Date: Mon, 22 Apr 2024 12:14:18 +0200 Subject: [PATCH 1/3] LDAP login installed app requirements --- apis_ontology/settings/server_settings.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apis_ontology/settings/server_settings.py b/apis_ontology/settings/server_settings.py index aeda594..9ec7cfd 100644 --- a/apis_ontology/settings/server_settings.py +++ b/apis_ontology/settings/server_settings.py @@ -6,6 +6,10 @@ APIS_BASE_URI = "https://tibschol.acdh-ch.oeaw.ac.at/" ROOT_URLCONF = "apis_ontology.urls" +CSRF_TRUSTED_ORIGINS = [ + "https://tibschol.acdh-ch.oeaw.ac.at", + "https://tibschol-test.acdh-ch-dev.oeaw.ac.at", +] INSTALLED_APPS += [ "apis_core.relations", @@ -13,7 +17,12 @@ "django.contrib.postgres", "apis_core.collections", "apis_core.history", + "django_action_logger", + "django_acdhch_functions", ] +INSTALLED_APPS.remove("apis_ontology") +INSTALLED_APPS.insert(0, "apis_ontology") + LOGGING = { "version": 1, From 70fe215c36ba76b52d265750fceaed03c098e577 Mon Sep 17 00:00:00 2001 From: Gytha Ogg Date: Mon, 22 Apr 2024 12:19:20 +0200 Subject: [PATCH 2/3] Add action logger URLs --- apis_ontology/urls.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apis_ontology/urls.py b/apis_ontology/urls.py index 86dd4e5..e001e7f 100644 --- a/apis_ontology/urls.py +++ b/apis_ontology/urls.py @@ -16,6 +16,9 @@ ] urlpatterns += staticfiles_urlpatterns() +urlpatterns += [ + path("logger/", include("django_action_logger.urls")), +] urlpatterns += [ path("", include("django_acdhch_functions.urls")), ] From d0e319b1841e2c68bc7d71b7a458df181ffa0ba0 Mon Sep 17 00:00:00 2001 From: Gytha Ogg Date: Mon, 22 Apr 2024 12:28:50 +0200 Subject: [PATCH 3/3] Add manage.py --- manage.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 manage.py diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..01084a6 --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +import os +import sys + +if __name__ == "__main__": + + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "apis_ontology.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django # noqa + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv)