title: return elements from OnetoOne and ForeignKey Query using Django
body: <p>I have the three tables below and i am trying to write a query(or multiple queries) that would return all the <code>address</code> and <code>events</code> fields from their respective tables.</p>
  <pre><code>class Activity(models.Model):
    name = models.CharField(max_length=50)
    description = models.TextField(max_length=500)
  
  class Event(models.Model):
    date = models.DateField()
    start_time = models.TimeField()
    duration = models.PositiveSmallIntegerField()
    activity = models.ForeignKey(Activity, on_delete=models.CASCADE, related_name=&quot;activities&quot;)
  
  class Address(models.Model):
    event = models.OneToOneField(Event, on_delete=models.CASCADE, primary_key=True)
    address = models.CharField(max_length=100)
  </code></pre>
  <p>This is what i tried but it does not seem to be appropriate, it crashes!</p>
  <pre><code>    adds = Address.objects.all()
      for ad in adds:
          for events in ad.event.all():
              print(&quot;events&quot;, events)
  </code></pre>
  <p>is there a better way to do it? how can i achieve it?</p>
  <p>Thanks</p>