django.shortcuts redirect doesn't pass argument

2012-08-05 Thread forthfan
Hi all, I'm trying to pass a filepath from one view to another by using 'redirect' from django.shortcuts, but the argument is not getting passed. What am I doing wrong? def upload1(request): if request.method == 'POST': form = UploadFileForm(request.POST, request.FILES) if form.is_va

Re: django.shortcuts redirect doesn't pass argument

2012-08-05 Thread Karen Tracey
On Sun, Aug 5, 2012 at 9:21 PM, forthfan wrote: > > I'm trying to pass a filepath from one view to another by using 'redirect' > from django.shortcuts, but the argument is not getting passed. What am I > doing wrong? > > def upload1(request): > if request.method == 'POST': > form = UploadF

Re: django.shortcuts redirect doesn't pass argument

2012-08-05 Thread Bill Beal
My example is wrong, because filepath turns out to be an 'InMemoryUploadedFile' object. But the problem remains the same because I had a dummy filename string that I was trying to pass. Actually the file would be uploaded to the server to a local file in upload1, then the filepath of the local fi

Re: django.shortcuts redirect doesn't pass argument

2012-08-05 Thread Bill Beal
I see that I had mixed the second and third ways of using 'redirect' in the doc. It seems to be working OK this way: def upload1(request): . . . fout = 'tempfile.csv' return redirect('/isf/upload2/' + fout + '/') def upload2(request, filename=None): . . . with the following in u