0.12.33 fix redirect to subscribe after login
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user