title: ajax post data in django1.5 ListView
body: <p>So, I have a small blog app(django newbie here) with blog articles, and I am looking to include a "rating" to each of these items (similar to up/down on stackoflow). So, what I have is a ajax based GET in a ListView - but I now realize I need POST to "modify" this ratings data. I have been looking to post data from a django ListView, but I am unable to see how this can be done.  The current GET code, which is a listview of all blog articles (paginated) looks as follows:</p>
  
  <pre><code>#views.py
  class AwesomeDisplayListView(JSONResponseMixin,ListView):
      model = blogposts
      template_name = "awesome_list.html"
      paginate_by = '15'
      context_object_name = "searchres"
  
      def get_context_data(self, **kwargs):
          print "this is get_context_data"
          context = super(SearchDisplayListView, self).get_context_data(**kwargs)
          q = self.request.GET.get('q')
          context['searchq'] = q
          return context
  
      def get_queryset(self):
          print "this is get_queryset"
                  # get some queryset
          return queryset 
  
      def render_to_response(self, context):
          if self.request.is_ajax():
              obj = {'name':'ajax', 'birthday':'may'}
              return JSONResponseMixin.render_to_response(self, obj)
          else:
              return ListView.render_to_response(self, context)
  </code></pre>
  
  <p>The above code works fine to get data ("obj") into the template and I am able to render both the blogposts and the GET ajax, but, what I would like to do is post data so that:
  [1] the rating is increased from its current value by 1
  [2] the particular action (clicking to vote), requires login_required.</p>
  
  <p>I was wondering if someone could point me in the right direction to do this. I have googled the problem, and people seem to suggest combining Mixins - but, unsure if this should be the case.</p>
  
  <p>Thanks.</p>