title: Page redirection after Ajax request in javascript
body: <p>I send a ajax post request with jquery:</p>
  
  <pre><code>$(function(){
  
      $(".palcesubm").click(function(){
          var location = $('#detail_address').val()
          $.post('/wechat/locate/select/current/',{'location':location})
      })
  
  });
  </code></pre>
  
  <p>In my view, I can receive this request. Then I save the data in seesion, and redirect the request to another url with HttpResponseRedirect </p>
  
  <pre><code>@csrf_exempt
  def confirm_location(request):
      if request.method == 'GET':
          lat = request.session.get('latitude')
          lng = request.session.get('longitude')
          area, detail_address = get_area_and_detail_address(lat, lng)
  
          t= loader.get_template('confirm_location.html')
          html = t.render(Context({'area':area, 'detail_address': detail_address}))
          return HttpResponse(html)
  
      else:
          request.session['location'] = request.POST.get('location')
          redirect_url = '/wechat/stores/direct/list?first_level='+ str(request.session.get('first_level'))
  
          print redirect_url
          return HttpResponseRedirect(redirect_url)
  </code></pre>
  
  <p>Here is the redirected url's view</p>
  
  <pre><code>def direct_store_list(request):
  
      first_level = request.GET.get('first_level')
      request.session['first_level'] = first_level
      store_level_list = get_store_level_list(first_level)
      merchant_list = []
      location =''
  
      lat = request.session.get('latitude')
      lng = request.session.get('longitude')
      if request.session.get('telphone') is None:
          if request.session.get('location') is None:
              location = get_store_location(lat,lng)
          else:
              location = request.session.get('location')
              del request.session['location']
      else:
          if request.session.get('location') is None:
              location = get_user_default_location(request.session.get('telphone'))
          else:
              location = request.session.get('location')
              del request.session['location']
  
      merchant_list = get_merchant_list(first_level,lat,lng)
  
      t= loader.get_template('direct_store_list.html')
      html = t.render(Context({'store_level_list':store_level_list, 'merchant_list':merchant_list,
                               'location':location}))
  
      return HttpResponse(html)
  </code></pre>
  
  <p>In the terminal, http response 200 OK, but page don't redirect to this page as normal HttpResponseRedirect. How to solve this problem? Thanks</p>
  
  <pre><code>[23/Oct/2014 14:34:23] "POST /wechat/locate/select/current/ HTTP/1.1" 302 0
  [23/Oct/2014 14:34:24] "GET /wechat/stores/direct/list?first_level=1 HTTP/1.1" 200 2452
  </code></pre>