mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 03:42:11 +01:00 
			
		
		
		
	Add specific login and logout pages for chat
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
# Copyright (C) 2024 by Animath
 | 
			
		||||
# SPDX-License-Identifier: GPL-3.0-or-later
 | 
			
		||||
 | 
			
		||||
from django.contrib.auth.views import LoginView, LogoutView
 | 
			
		||||
from django.urls import path
 | 
			
		||||
from django.utils.translation import gettext_lazy as _
 | 
			
		||||
from tfjm.views import LoginRequiredTemplateView
 | 
			
		||||
@@ -10,5 +11,8 @@ app_name = 'chat'
 | 
			
		||||
urlpatterns = [
 | 
			
		||||
    path('', LoginRequiredTemplateView.as_view(template_name="chat/chat.html",
 | 
			
		||||
                                               extra_context={'title': _("Chat")}), name='chat'),
 | 
			
		||||
    path('fullscreen/', LoginRequiredTemplateView.as_view(template_name="chat/fullscreen.html"), name='fullscreen'),
 | 
			
		||||
    path('fullscreen/', LoginRequiredTemplateView.as_view(template_name="chat/fullscreen.html", login_url='chat:login'),
 | 
			
		||||
         name='fullscreen'),
 | 
			
		||||
    path('login/', LoginView.as_view(template_name="chat/login.html"), name='login'),
 | 
			
		||||
    path('logout/', LogoutView.as_view(next_page='chat:fullscreen'), name='logout'),
 | 
			
		||||
]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user