- redirect = request.GET.get('next')
- if not request.is_ajax() and redirect:
- return HttpResponseRedirect(urlquote_plus(
- redirect, safe='/?=&'))
- response_data = {'success': True,
- 'message': self.success_message, 'redirect': redirect}
+ response_data = {
+ 'success': True,
+ 'message': self.success_message,
+ 'redirect': request.GET.get('next')
+ }