ChatServiceApp
This commit is contained in:
SDE
2023-07-31 14:35:31 +03:00
parent a0ed17bcdc
commit fafe645f37
13 changed files with 180 additions and 0 deletions

View File

@@ -14,6 +14,9 @@ urlpatterns = [
path('my_routes/', my_routes_ajax, name='my_routes_ajax'),
path('subscribe/', subscribe_ajax, name='subscribe_ajax'),
path('new_msg_to_user/', new_msg_to_user_ajax, name='new_msg_to_user' ),
path('new_msg_to_support/', new_msg_to_support_ajax, name='new_msg_to_support_ajax'),
path('support_create_ticket_ajax/', support_create_ticket_ajax, name='support_create_ticket_ajax'),
path('change_profile/', change_profile_ajax, name='change_profile_ajax'),
]

View File

@@ -43,6 +43,21 @@ def new_msg_to_support_ajax(request):
html = render_to_string('blocks/profile/b_new_msg_to_support.html', Dict, request=request)
return JsonResponse({'html': html}, status=200)
def support_create_ticket_ajax(request):
from ChatServiceApp.forms import CreateTicketForm
if request.method != 'POST':
raise Http404
Dict = {
'forms': CreateTicketForm()
}
html = render_to_string('blocks/profile/b_create_ticket.html', Dict, request=request)
return JsonResponse({'html': html}, status=200)
def change_profile_ajax(request):
if request.method != 'POST':
raise Http404