title: Django html display from model
body: <p>I need on my html page to display data from Profesor and Ucenik model: ime, prezime, jmbg.</p>
  <pre><code>{{profesor.ime}}
  {{profesor.prezime}}
  {{ucenik.ime}}
  {{ucenik.prezime}}
  {{ucenik.jmbg}}
  </code></pre>
  <p>my profile page id dynamic, need to display profesor data or if ucenik to display ucenik data</p>
  <p>what i need to add on my views.py</p>
  <p>models.py</p>
  <pre><code>class Profesor(models.Model):
     user = models.OneToOneField(User, null=True, blank=True, on_delete=models.CASCADE)
     ime = models.CharField(max_length=200, null=True)
     prezime = models.CharField(max_length=200, null=True)
   
  class Ucenik(models.Model):
     user = models.OneToOneField(User, null=True, blank=True, on_delete=models.CASCADE)
     ime = models.CharField(max_length=200, null=True)
     prezime = models.CharField(max_length=200, null=True)
     jmbg = models.IntegerField(null=True)
  </code></pre>
  <p>urls.py</p>
  <pre><code>path('profesor/', views.profesor, name='profesor'),
  path('ucenik/', views.ucenik, name='ucenik'),
  path('posetioc/', views.posetioc, name='posetioc'),
  path('profil/&lt;str:pk&gt;/', views.profil, name='profil'), ]
  </code></pre>
  <p>views.py</p>
  <pre><code>def profesor(request):
  
     return render(request, 'pocetna_profesor.html')
  
  
  def ucenik(request):
  
     return render(request, 'pocetna_ucenik.html')
  
  
  def profil(request, pk):
  
     return render(request, 'profil.html')
  </code></pre>
  <p>HTML:</p>
  <pre><code>{% extends 'base.html' %}
  &lt;title&gt;profesor&lt;/title&gt;
  
  {% block content %}
  
  &lt;body&gt;
  {% include 'navbar.html' %}
     &lt;h1&gt;Ime:&lt;/h1&gt;
     {{profesor.ime}}
  &lt;/body&gt;
  
  {% endblock %}
  </code></pre>