0.7.77
dashboard page
This commit is contained in:
@@ -152,6 +152,25 @@ def change_profile_confirm_ajax(request):
|
||||
html = get_profile_change_page_content_html(request)
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
|
||||
|
||||
@login_required(login_url='/profile/login/')
|
||||
def dashboard_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
try:
|
||||
|
||||
from .funcs import get_dashboard_page_content_html
|
||||
html = get_dashboard_page_content_html(request)
|
||||
|
||||
except Exception as e:
|
||||
msg = f'dashboard_ajax Error = {str(e)}'
|
||||
print(msg)
|
||||
html = msg
|
||||
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
|
||||
|
||||
@login_required(login_url='/profile/login/')
|
||||
def change_profile_ajax(request):
|
||||
if request.method != 'POST':
|
||||
@@ -208,7 +227,7 @@ def login_ajax(request):
|
||||
|
||||
|
||||
res_Dict = {
|
||||
'redirect_url': reverse('user_profile')
|
||||
'redirect_url': reverse('profile_page', args=['dashboard'])
|
||||
}
|
||||
|
||||
return JsonResponse(res_Dict)
|
||||
@@ -259,7 +278,7 @@ def registration_ajax(request):
|
||||
user.user_profile.save()
|
||||
|
||||
res_Dict = {
|
||||
'redirect_url': reverse('user_profile')
|
||||
'redirect_url': reverse('profile_page', args=['dashboard'])
|
||||
}
|
||||
|
||||
return JsonResponse(res_Dict)
|
||||
|
||||
Reference in New Issue
Block a user