1.3.0 receive_finish_subscribe_msg, find errors by tickets
This commit is contained in:
@@ -6,9 +6,12 @@ from .js_views import *
|
|||||||
from django.contrib.auth import views
|
from django.contrib.auth import views
|
||||||
from RoutesApp.js_views import new_route_view_ajax
|
from RoutesApp.js_views import new_route_view_ajax
|
||||||
|
|
||||||
|
# /subscribes/receive_finish_subscribe_msg/
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('show_cur_subscribe/', show_cur_subscribe_ajax, name='show_cur_subscribe_ajax'),
|
path('show_cur_subscribe/', show_cur_subscribe_ajax, name='show_cur_subscribe_ajax'),
|
||||||
path('subscribe_now/', subscribe_now_ajax, name='subscribe_now_ajax'),
|
path('subscribe_now/', subscribe_now_ajax, name='subscribe_now_ajax'),
|
||||||
|
path('receive_finish_subscribe_msg/', receive_finish_subscribe_msg_ajax, name='receive_finish_subscribe_msg_ajax'),
|
||||||
# path('create_ticket/', create_ticket_ajax, name='create_ticket_ajax'),
|
# path('create_ticket/', create_ticket_ajax, name='create_ticket_ajax'),
|
||||||
# path('support_show_chat_by_ticket/', support_show_chat_by_ticket_ajax, name='support_show_chat_by_ticket_ajax'),
|
# path('support_show_chat_by_ticket/', support_show_chat_by_ticket_ajax, name='support_show_chat_by_ticket_ajax'),
|
||||||
# # path('send_msg/', send_msg_ajax, name='send_msg_ajax'),
|
# # path('send_msg/', send_msg_ajax, name='send_msg_ajax'),
|
||||||
|
|||||||
@@ -20,6 +20,26 @@ from GeneralApp.funcs import get_and_set_lang
|
|||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
|
|
||||||
|
|
||||||
|
def receive_finish_subscribe_msg_ajax(request):
|
||||||
|
if request.method != 'POST':
|
||||||
|
raise Http404
|
||||||
|
|
||||||
|
lang = get_and_set_lang(request)
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
|
data = json.loads(request.body)
|
||||||
|
|
||||||
|
user_subscribe = get_cur_user_subscribe(request.user)
|
||||||
|
user_subscribe.receive_finish_subscribe_msg = data['receive_finish_subscribe_msg']
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
msg = f'msg_send_after_subscribe_end_ajax Exception = {str(e)}'
|
||||||
|
return JsonResponse({'error': msg}, status=400)
|
||||||
|
|
||||||
|
return JsonResponse({'status': user_subscribe.receive_finish_subscribe_msg}, status=200)
|
||||||
|
|
||||||
|
|
||||||
@login_required()#login_url='/profile/login/')
|
@login_required()#login_url='/profile/login/')
|
||||||
def subscribe_now_ajax(request):
|
def subscribe_now_ajax(request):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user