profile new pages
This commit is contained in:
SDE
2023-07-26 17:44:38 +03:00
parent 5688746e4f
commit 1cf3041e95
8 changed files with 88 additions and 0 deletions

View File

@@ -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'),
]

View File

@@ -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

View File

@@ -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'),

View File

@@ -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)

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>