title: django query set for more than one model
body: <p>I am working for search in django and I am not able to find if I can able to use two different models in same app in results of that query set.</p>
  
  <p>For eg. I am making search as shown but the fields <code>authors</code> and <code>title</code> are from different models what should I do at line <code>results = Books.object...</code> where <code>Books</code> is for model name. 
  my original views:</p>
  
  <pre><code>from django.db.models import Q
  from django.shortcuts import render_to_response 
  from bills.models import *
  
  def search(request):
      query = request.GET.get('q', '')
      if query:
          qset = (
              Q(expenses__rate_of_pure__icontains=query) |
              Q(expenses__customer_id__icontains=query) |
              Q(Choice__carat__icontains=query)  |
              Q(Choice__labour_cost__icontains=query)  |
              Q(Choice__item__icontains=query)  |
              Q(Choice__weight__icontains=query)
          )
          results = expenses.objects.filter(qset).distinct()   
      else:
          results = []
      return render_to_response("bills/search.html", {"results": results,
                                                "query": query})
  </code></pre>
  
  <p>and models are:</p>
  
  <pre><code>from django.db import models
  from front.models import category
  class expenses(models.Model): 
      purchase_order_no = models.IntegerField(max_length=3,\
                                              primary_key=True)  
      rate_of_pure = models.IntegerField(max_length=15)
      voucher = models.IntegerField(null=True)
      customer_id = models.ForeignKey(category)
      def __unicode__(self):
          return'%s' % (self.purchase_order_no)
  
  class Choice(models.Model):
      customer_id  = models.ForeignKey(expenses, unique=False, blank=True,  
      null=True) 
      carat = models.IntegerField(max_length=2)
      item = models.CharField(max_length=25) 
      weight = models.FloatField(max_length=10) 
      labour_cost = models.IntegerField(max_length=10)
  </code></pre>
  
  <p>the thing I want to ask is in views line 16, where i have to give the name of models which model should i give as i am using two parts of the model.                                </p>