Show the currently logged in user
This commit is contained in:
		| @@ -61,7 +61,9 @@ ROOT_URLCONF = 'scim_app.urls' | |||||||
| TEMPLATES = [ | TEMPLATES = [ | ||||||
|     { |     { | ||||||
|         'BACKEND': 'django.template.backends.django.DjangoTemplates', |         'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||||||
|         'DIRS': [], |         'DIRS': [ | ||||||
|  |             BASE_DIR / 'templates', | ||||||
|  |         ], | ||||||
|         'APP_DIRS': True, |         'APP_DIRS': True, | ||||||
|         'OPTIONS': { |         'OPTIONS': { | ||||||
|             'context_processors': [ |             'context_processors': [ | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| from django.utils.decorators import method_decorator | 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 | from basicauth.decorators import basic_auth_required | ||||||
|  |  | ||||||
| @method_decorator(basic_auth_required, name='dispatch') | @method_decorator(basic_auth_required, name='dispatch') | ||||||
| class AuthView(View): | class AuthView(TemplateView): | ||||||
|     pass |     template_name = "index.html" | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								scim_app/templates/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								scim_app/templates/index.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | <!DOCTYPE html> | ||||||
|  | <html> | ||||||
|  |     <head> | ||||||
|  |         <title>SCIM app</title> | ||||||
|  |     </head> | ||||||
|  |  | ||||||
|  | <body> | ||||||
|  |     Hallo! | ||||||
|  |  | ||||||
|  |     <pre> | ||||||
|  |         {{ user }} | ||||||
|  |     </pre> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
		Reference in New Issue
	
	Block a user