Show the currently logged in user
This commit is contained in:
		| @@ -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': [ | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
							
								
								
									
										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