0
votes
 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, '']
2
Where's your code? - Jacob

2 Answers

0
votes

Your view is not able to fetch the value of your redirect_field_name.

Add this function in your models.py file in class where you have defined this table.

def __getitem__(self): return self.redirect_field_name

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!