File "/home/vikas/Desktop/mia/accounts/views.py", line 37, in login
redirect_to = request.GET.get[redirect_field_name, '']
redirect_to = request.GET.get[redirect_field_name, '']
0
votes
2 Answers
0
votes
0
votes
Looking at the code, I assume you want to get the value of redirect_field_name or an empty string if it is not found.
The thing is that you need to call the function get from the request.GET dictionary, and you're currently mixing concepts (you are using [] instead of ()).
Try that:
redirect_to = request.GET.get(redirect_field_name, '')
Hope this helps!