0.12.33 fix redirect to subscribe after login

This commit is contained in:
SDE
2024-04-12 18:40:06 +03:00
parent 10e8d477e5
commit 07b06a4177

View File

@@ -443,9 +443,12 @@ def login_ajax(request):
html = render_to_string('forms/f_login.html', Dict, request=request)
return JsonResponse({'html': html}, status=400)
if not 'HTTP_REFERER' in request.META or not '/?next=/' in request.META['HTTP_REFERER']:
redirect_url = reverse('profile_page', args=['dashboard'])
else:
redirect_url = request.META['HTTP_REFERER'].split('/?next=')[1]
res_Dict = {
'redirect_url': reverse('profile_page', args=['dashboard'])
'redirect_url': redirect_url
}
return JsonResponse(res_Dict)