title: Error with python / django1.7 (Exception Type: AttributeError)
body: <p>I'm learning Python and Django and emerged me the following error that I can not solve :</p>
  
  <pre><code>Exception Type: AttributeError
  Exception Value: 'QuerySet' object has no attribute 'apellido'
  </code></pre>
  
  <p>(models)</p>
  
  <pre><code>class Humano(models.Model):
  
      nombre = models.CharField(max_length=30)
      apellido = models.CharField(max_length=30)
  
      def __unicode__(self):
          return self.nombre
  
      def apellido(self):
          return self.apellido
  </code></pre>
  
  <p>(forms)</p>
  
  <pre><code>class formulario(forms.Form):
      nombre = forms.CharField(max_length=30)
      apellido = forms.CharField(max_length=30)
  </code></pre>
  
  <p>(views)</p>
  
  <pre><code>def comparar(request):
      if request.method == 'POST':
          form = formulario(request.POST)
          if form.is_valid():
              objeto = Humano(
  
              nombre = form.cleaned_data['nombre'],
              apellido = form.cleaned_data['apellido'],
  
              )
  
  
              objeto2 = Humano.objects.all()
              n = objeto2.apellido()        # el error me marca esta linea
  
              if n == objeto.apellido:
                  z = 'los apellidos son iguales'
              else:
                  z = 'los apellidos son distintos'
  
          return render_to_response('index.html', { 'z':z}, context_instance=RequestContext(request))
      else:
          form = formulario()
      return render_to_response('index.html', {'form':form}, context_instance=RequestContext(request))
  </code></pre>
  
  <p>The purpose of the view is to compare a apellido received through a form and compare it with other existing in the database .</p>