diff --git a/AuthApp/js_urls.py b/AuthApp/js_urls.py index c1ae1b3..d8fce57 100644 --- a/AuthApp/js_urls.py +++ b/AuthApp/js_urls.py @@ -12,4 +12,8 @@ urlpatterns = [ path('new_route_view/', new_route_view_ajax, name='new_route_view_ajax'), 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('change_profile/', change_profile_ajax, name='change_profile_ajax'), ] \ No newline at end of file diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 6c42724..9b7088a 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -13,6 +13,47 @@ from django.template.loader import render_to_string from django.urls import reverse +def subscribe_ajax(request): + if request.method != 'POST': + raise Http404 + + Dict = { + } + + html = render_to_string('blocks/profile/b_subscribe.html', Dict, request=request) + return JsonResponse({'html': html}, status=200) + +def new_msg_to_user_ajax(request): + if request.method != 'POST': + raise Http404 + + Dict = { + } + + html = render_to_string('blocks/profile/b_new_msg_to_user.html', Dict, request=request) + return JsonResponse({'html': html}, status=200) + +def new_msg_to_support_ajax(request): + if request.method != 'POST': + raise Http404 + + Dict = { + } + + html = render_to_string('blocks/profile/b_new_msg_to_support.html', Dict, request=request) + return JsonResponse({'html': html}, status=200) + +def change_profile_ajax(request): + if request.method != 'POST': + raise Http404 + + Dict = { + } + + html = render_to_string('blocks/profile/b_profile.html', Dict, request=request) + return JsonResponse({'html': html}, status=200) + + def my_routes_ajax(request): if request.method != 'POST': raise Http404 diff --git a/AuthApp/urls.py b/AuthApp/urls.py index 04b6056..4a8dac7 100644 --- a/AuthApp/urls.py +++ b/AuthApp/urls.py @@ -11,6 +11,7 @@ urlpatterns = [ path('', user_profile_View, name='user_profile'), path('login/', login_View, name='login_profile'), + # ajax ---------------- # url(r'^login$', user_login_View_ajax, name='user_login_View_ajax'), # url(r'^login_confirm$', user_login_confirm_ajax, name='user_login_confirm_ajax'), diff --git a/TWB/urls.py b/TWB/urls.py index 2bbd587..d2a4233 100644 --- a/TWB/urls.py +++ b/TWB/urls.py @@ -23,6 +23,8 @@ urlpatterns += i18n_patterns( path('routes/', include('RoutesApp.js_urls')), path('reference_data/', include('ReferenceDataApp.js_urls')), + + ) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/templates/blocks/profile/b_new_msg_to_support.html b/templates/blocks/profile/b_new_msg_to_support.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/templates/blocks/profile/b_new_msg_to_support.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/templates/blocks/profile/b_new_msg_to_user.html b/templates/blocks/profile/b_new_msg_to_user.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/templates/blocks/profile/b_new_msg_to_user.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/templates/blocks/profile/b_profile.html b/templates/blocks/profile/b_profile.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/templates/blocks/profile/b_profile.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file diff --git a/templates/blocks/profile/b_subscribe.html b/templates/blocks/profile/b_subscribe.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/templates/blocks/profile/b_subscribe.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file