I need to get data from a redirect, but I can't really figure out how. The method is GET as I can see from my print. But I have tried everything I found on searching for this without luck. What am I doing wrong? I really appreciate any help.
I have this redirect:
return redirect('/list-view', new = 'new')
My urls looks like this:
path('list-view/<new>', views.list_view, name='list'),
Then my list-view is:
def list_view(request, *args, **kwargs):
print(request.method)
if request.method == 'GET':
aa=request.GET.get('new')
if aa:
bb = (request.GET.get('new'))
print (bb['new'])