Hi, I have a form with 2 buttons. depending on the button click user is taken to different url. view function is :
friend_id = request.POST.get('selected_friend_id_list')
history = request.POST.get('statushistory')
if history:
print "dfgdfgdf"
return HttpResponseRedirect('../status/')
else:
return direct_to_template(request, 'friends_list.fbml',
extra_context={'fbuser': user,
'user_lastname':user_lastname,
'activemaintab':activemaintab,
'friends':friends,
'friend_list':friend_list})
for template :
<input type="submit" value="Calendar View" name="calendarview"/>
<input type="submit" value="Status History" name="statushistory"/>
</form
so my problem is page is not redirecting to the url . If I make HttpResponseRedirect('../') it gives me the correct page but url is not changing.
current page = "friendlist/ status/ so after submitting form my url should be frinedlist/list/ so this should work HttpResponseRedirect('../list/') but url is not getting changed. Any idea? How can I fix this Thanks