title: OnetoOneField Django query
body: <p>so I have this two models:</p>
  
  <pre><code>class Patient(models.Model):
      patientID = models.CharField(max_length=200 , default='Enter PatientID')
      age = models.IntegerField(default='-')
      gender = models.CharField(max_length=200,choices=Gender_Choice, default='UNDEFINED')
  
  class RiskFactor(models.Model):
      patient = models.OneToOneField(Patient, on_delete=models.CASCADE)
      hypertension = models.BooleanField(default=False)
      diabetes = models.BooleanField(default=False)
      PAVK = models.BooleanField(default=False)
      nicotin = models.BooleanField(default=False)
  </code></pre>
  
  <p>So I've changed from ForeignKey to OnetoOneField because of reasons. So with the ForeignKey everything was easypeasy and I can show the data of the RiskFactor model in my Patient detail template. Now I have problems to change the query. I just don't know how to change this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;
    {% for rfac in patient.riskfactor_set.all %}
     &lt;li&gt;Hypertension: {{ rfac.hypertension }}&lt;br/&gt;
        Diabetes: {{ rfac.diabetes }}&lt;br/&gt;
        PAVK: {{ rfac.PAVK }}&lt;br/&gt;
        Nicotin: {{ rfac.nicotin }}&lt;br/&gt;
     &lt;/li&gt;
     {% endfor %}
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>into sth that shows the riskfactor data from the patient with a OneToOneRel. </p>
  
  <p>Thanks for your help! </p>