chat v2
This commit is contained in:
SDE
2023-08-11 12:37:07 +03:00
parent bba583ae56
commit bbad0dc726
3 changed files with 11 additions and 0 deletions

View File

@@ -8,7 +8,9 @@ from RoutesApp.js_views import new_route_view_ajax
urlpatterns = [
path('registration/', registration_ajax, name='registration_ajax'),
path('login/', login_ajax, name='login_ajax'),
# path('login/', login_ajax, name='login_ajax'),
path('new_route_view/', new_route_view_ajax, name='new_route_view_ajax'),

View File

@@ -11,7 +11,9 @@ urlpatterns = [
path('', user_profile_View, name='user_profile'),
path('chat/<int:user_id>/', chat_w_user_View, name='chat_w_user'),
path('chat/', chat_w_user_View, name='chat_w_user_wo_user_id'),
path('login/', login_View, name='login_profile'),
path('logout/', logout_View, name='logout_profile'),
# ajax ----------------

View File

@@ -66,6 +66,13 @@ def user_profile_View(request):
return response
def logout_View(request):
from django.contrib.auth import logout
from django.shortcuts import redirect
logout(request)
return redirect('login_profile')
def login_View(request):
Dict = {}