Skip to content

Commit

Permalink
Merge pull request #6 from acdh-oeaw/bugfix/login-redirect
Browse files Browse the repository at this point in the history
Bugfix/login redirect
  • Loading branch information
gythaogg authored Apr 22, 2024
2 parents 8d6a7e5 + d0e319b commit 632cb1e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apis_ontology/settings/server_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@
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",
"apis_highlighter",
"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,
Expand Down
3 changes: 3 additions & 0 deletions apis_ontology/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
]

urlpatterns += staticfiles_urlpatterns()
urlpatterns += [
path("logger/", include("django_action_logger.urls")),
]
urlpatterns += [
path("", include("django_acdhch_functions.urls")),
]
22 changes: 22 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 632cb1e

Please sign in to comment.