title: How to access a field from a ForeignKey on a Queryset in django?
body: <p>This is my <code>models.py</code>:</p>
  <pre><code>class Computer(models.Model):
      name = models.CharField(max_length=40)
      ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
  
  class Template(models.Model):
      data = models.JSONField(...)
      computer = models.ForeignKey(Computer,on_delete=models.CASCADE)
  </code></pre>
  <p>When I delete a template object, from django admin, I need to make an API request, so I edited the <code>delete()</code> method. That works fine.
  But this doesn't work for the multiple delete option in django admin. I already know that I have to edit the <code>delete_queryset()</code> in <code>admin.py</code>.</p>
  <p>What I need to know is how to get the <code>field IP</code> from Computer from the queryset that the <code>delete_queryset()</code> method returns.</p>
  <p>When I do the following in <code>admin.py</code>:</p>
  <pre><code>class TemplateAdmin(admin.ModelAdmin):
  
      def delete_queryset(self,request,queryset):
          print(queryset)
          print(queryset.values('computer'))
          ...
  </code></pre>
  <p>And I try to delete multiple template objects (A,B and C)
  I get the following response:
  <code>&lt;QuerySet [&lt;Template: A&gt;, Template: B&gt;, Template: C&gt;]&gt;</code>
  <code>&lt;QuerySet [{'computer': 22}, {'computer': 21}, {'computer': 21}]&gt;</code></p>
  <p>22 and 21 are the <code>computer_id</code> referenced by the <code>ForeignKey</code> in <code>A</code>,<code>B</code> and <code>C</code>.</p>
  <p>The question is, how do I access the <code>IP field</code> from those computers so that I can make the API request in the <code>delete_queryset()</code> method?</p>