0.2.11
chat v2
This commit is contained in:
@@ -8,7 +8,9 @@ from RoutesApp.js_views import new_route_view_ajax
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('registration/', registration_ajax, name='registration_ajax'),
|
path('registration/', registration_ajax, name='registration_ajax'),
|
||||||
|
|
||||||
path('login/', login_ajax, name='login_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'),
|
path('new_route_view/', new_route_view_ajax, name='new_route_view_ajax'),
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ urlpatterns = [
|
|||||||
path('', user_profile_View, name='user_profile'),
|
path('', user_profile_View, name='user_profile'),
|
||||||
path('chat/<int:user_id>/', chat_w_user_View, name='chat_w_user'),
|
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('chat/', chat_w_user_View, name='chat_w_user_wo_user_id'),
|
||||||
|
|
||||||
path('login/', login_View, name='login_profile'),
|
path('login/', login_View, name='login_profile'),
|
||||||
|
path('logout/', logout_View, name='logout_profile'),
|
||||||
|
|
||||||
|
|
||||||
# ajax ----------------
|
# ajax ----------------
|
||||||
|
|||||||
@@ -66,6 +66,13 @@ def user_profile_View(request):
|
|||||||
return response
|
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):
|
def login_View(request):
|
||||||
|
|
||||||
Dict = {}
|
Dict = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user