title: Easiest way to display Django model data in html
body: <p>I have data being stored in a Django model, and I want to display that data in my HTML file. What is the easiest way that I could do this? I am familiar with [this][1] question, but it does not help me because it is not very detailed and does not have a definite answer. Can someone please help me? My code is down below.</p>
  <hr />
  <p>Django Model:</p>
  <pre><code>class userdetails(models.Model):
    donations = models.IntegerField(blank=True, null = True,)
    points = models.IntegerField(blank=True, null = True,)
    user = models.ForeignKey(
          settings.AUTH_USER_MODEL,
          on_delete=models.CASCADE,
          blank=True,
          null=True,
      )
  </code></pre>
  <p>HTML where I want to display data from the model:</p>
  <pre><code>&lt;div class=&quot;box&quot;&gt;
                     &lt;span class=&quot;value&quot;&gt; &lt;/span&gt;  
                     &lt;span class=&quot;parameter&quot;&gt;Points&lt;/span&gt;
                  &lt;/div&gt;
  </code></pre>
  <p>This is my view:</p>
  <pre><code>    @login_required(login_url='/login/')
  def dashboard(request):
      id = request.user.id
      data= userdetails.objects.get(id=id)
      return render(request,'dashboard.html',{'data':data})
      
  </code></pre>
  <p>The error I keep getting:</p>
  <pre><code>DoesNotExist at /dashboard/
  userdetails matching query does not exist.
  </code></pre>
  <p>Has something to do with <code>data= userdetails.objects.get(id=id)</code> in my views.</p>