title: request through ajax render to a page not working django
body: <p>After making an ajax request data is being sent successfully to view. But the render function is not working. Render function should render to dashboard.html with data. I have imported all files needed to render. Is it because of an ajax request. Thanks in advance...</p>
  
  <hr>
  
  <p><strong>My ajax request from template</strong></p>
  
  <pre><code>$("#campaign").click(function () {
      alert("hey main")
      alert($("#campaign").val());
      var id = $("#campaign").val()
      $.ajax({
          type: "POST",
          url: "{% url 'appdata' %}",
          data: {
              userid: id
          }
      }).done(function () {
          alert("Data Sent: ");
      }).fail(function () {
          alert("error");
      });
      /* location.reload()*/
  });
  </code></pre>
  
  <hr>
  
  <p><strong>My urls.py</strong></p>
  
  <pre><code>url(r'^publisher/appdata/?$', 'appdata', name='appdata'),
  </code></pre>
  
  <hr>
  
  <p><strong>My views.py</strong></p>
  
  <pre><code>def appdata(request):
  
      print 'hi i am appdata, fetch me after select id'
  
      print request
      userid = request.POST['userid']
      # print 'userid: %s'%userid
      impressions = Impressions.objects.get(id=userid)
      # print 'impressionid: %s'%impressions.id
      clicks = Clicks.objects.get(id=userid)
      revenues = Revenue.objects.get(id=userid)
      ecpm = App.objects.get(id=userid)
      member = Member.objects.get(id=userid)
      campaigns_id = Campaign.objects.get(id=userid)
  
      # print campaigns_id
      # print type(campaigns_id)
      apps = App.objects.all()
      # print apps
  
      # for i in apps:
          # print i.name
      # print len(camps)
  
      # dict = {'i':impressions, 'c':clicks, 'r':revenues, 'e':ecpm, 'apps': apps, 'member':member, 'c_id':campaigns_id } 
      # print dict['i'].impressions
  
      return render(request, 'dashboard.html', {'i':impressions, 'c':clicks, 'r':revenues, 'e':ecpm, 'apps': apps, 'member':member, 'c_id':campaigns_id })
  </code></pre>