title: Why is only some context data available in django template?
body: <p>I'm having trouble accessing some of the context data in a django template, probably due to a basic misunderstanding on my part. Please see abbreviated code below. My view is:</p>
  <pre class="lang-py prettyprint-override"><code>class UserCourseListView(LoginRequiredMixin, generic.ListView):
      
      model = CustomUser    
      template_name = 'account/course/list.html'
      context_object_name = 'puser_course_list'
      
      def get_queryset(self):        
          return CustomUser.objects.filter(username=self.request.user.username)
  </code></pre>
  <p>My model is:</p>
  <pre class="lang-py prettyprint-override"><code>
  class CustomUser(AbstractUser):
      email = models.EmailField(max_length=254, blank=False,)
      course = models.ManyToManyField(Course, related_name=&quot;course&quot;, blank=True)
      firstname = models.TextField(max_length=254, blank=True )
      surname = models.TextField(max_length=254, blank=True )
      nickname = models.TextField(max_length=254, blank=True )
     
  
      def __str__(self):
          return str(self.id)
      def get_absolute_url(self):
          return reverse('patient_user_detail', args=[str(self.id)])
  </code></pre>
  <p>And template is:</p>
  <pre><code>{% for pcourse in puser_course_list %}    
            
      &lt;dt&gt;{{ pcourse.courses_joined.all }}&lt;/dt&gt; # displayed in browser
      &lt;dt&gt;{{ pcourse.id }}&lt;/dt&gt; # displayed in browser
      &lt;dt&gt;{{ pcourse.username }}&lt;/dt&gt; # displayed in browser
      &lt;dt&gt;{{ pcourse.email }}&lt;/dt&gt; # displayed in browser
      &lt;dt&gt;{{ pcourse.firstname }}&lt;/dt&gt; # not displayed in browser
      &lt;dt&gt;{{ pcourse.surname }}&lt;/dt&gt; # not displayed in browser
  
  {% endfor %}
  </code></pre>
  <p>I am able to acces the user id, username, email and retrieve a queryset from a related model (using related name 'courses_joined'), but can't retrieve the firstname and surname? Any thoughts or help would be most appreciated. I'm assuming a context processor isn't required in this scenario as all of the data should be in the context_object?</p>