Show the currently logged in user

This commit is contained in:
Xeryus Stokkel 2022-01-13 14:23:13 +01:00
parent 43c7ef837f
commit ae5a97d7ec
Signed by: Xeryus Stokkel
GPG Key ID: 7023C2C891DDE681
3 changed files with 20 additions and 4 deletions

View File

@ -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': [

View File

@ -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"

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>SCIM app</title>
</head>
<body>
Hallo!
<pre>
{{ user }}
</pre>
</body>
</html>