How To Pass A List Between Views In Django
I have a list in one view that I would like to pass to another view to be parsed. This is what I currently have. The views: def view1(request): if request.method=='POST':
Solution 1:
As Brandon suggested, posting to the second view was a usable solution. Something along the lines of:
defview2(request):
if request.method == 'POST':
page_list=request.POST.values()
else:
HttpResponseRedirect('/urls/')
and then no need for regex in the urls
Post a Comment for "How To Pass A List Between Views In Django"