Matching 3 out 5 fields - Django

Posted by RadiantHex on Stack Overflow See other posts from Stack Overflow or by RadiantHex
Published on 2010-06-03T08:54:34Z Indexed on 2010/06/03 9:14 UTC
Read the original article Hit count: 478

Hi folks,

I'm finding this a bit tricky! Maybe someone can help me on this one

I have the following model:

class Unicorn(models.Model):

  horn_length = models.IntegerField()
  skin_color = models.CharField()
  average_speed = models.IntegerField()
  magical = models.BooleanField()
  affinity = models.CharField()

I would like to search for all similar unicorns having at least 3 fields in common.


Is it too tricky? Or is it doable?

© Stack Overflow or respective owner

Related posts about python

Related posts about sql-server