From ae5a97d7ec43df933a11d6705bc859a920f45b76 Mon Sep 17 00:00:00 2001 From: Xeryus Stokkel Date: Thu, 13 Jan 2022 14:23:13 +0100 Subject: [PATCH] Show the currently logged in user --- scim_app/scim_app/settings.py | 4 +++- scim_app/scim_app/views.py | 6 +++--- scim_app/templates/index.html | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 scim_app/templates/index.html diff --git a/scim_app/scim_app/settings.py b/scim_app/scim_app/settings.py index 3513c07..20b0547 100644 --- a/scim_app/scim_app/settings.py +++ b/scim_app/scim_app/settings.py @@ -61,7 +61,9 @@ ROOT_URLCONF = 'scim_app.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + BASE_DIR / 'templates', + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/scim_app/scim_app/views.py b/scim_app/scim_app/views.py index 346079c..1cdca41 100644 --- a/scim_app/scim_app/views.py +++ b/scim_app/scim_app/views.py @@ -1,7 +1,7 @@ from django.utils.decorators import method_decorator -from django.views.generic import View +from django.views.generic import TemplateView from basicauth.decorators import basic_auth_required @method_decorator(basic_auth_required, name='dispatch') -class AuthView(View): - pass +class AuthView(TemplateView): + template_name = "index.html" diff --git a/scim_app/templates/index.html b/scim_app/templates/index.html new file mode 100644 index 0000000..5ad51ea --- /dev/null +++ b/scim_app/templates/index.html @@ -0,0 +1,14 @@ + + + + SCIM app + + + + Hallo! + +
+        {{ user }}
+    
+ +