title: removing duplicates from a list of django models
body: <p>I have a list of Django Models objects which i got from a query set, but there are duplicate objects in that list can one one tell me how to remove those </p>
  
  <p>I tried this but it gives me empty list didn't worked</p>
  
  <pre><code>print(somemodels) #union of some quersets as list
  &gt;&gt;&gt; [&lt;SomeModel: 1&gt;, &lt;SomeModel: 1&gt;, &lt;SomeModel: 2&gt;]
  cleaned_up_list = []
  
  for somemodel in somemodels:
      print (type(some model))
      &gt;&gt;&gt;&gt; &lt;class 'SomeModel.models.SomeModel'&gt;
      if somemodel not in somemodels:
          print ("SomeModel is not already in :" cleaned_up_list)
          cleaned_up_list.append(somemodel)
  
  print ("Very Final Results :", cleaned_up_list)
  </code></pre>
  
  <p>the cleaned up list is still empty? so it didn't worked that way, as you can there are same two models in <code>some models</code> with same <code>pk</code> of <code>1</code> i want to remove those duplicates can one please help me to remove duplicate django models from a list of django models?</p>